次のコード:
ConstantInt * Idx = cast<ConstantInt>(gepi->getOperand(2));
次のエラーが生成されます。
error: invalid use of incomplete type ‘struct llvm::ConstantInt’
error: forward declaration of ‘struct llvm::ConstantInt’
なぜこのキャストが機能しないのかわかりません。私はllvm 3.1を使用しています。何か助けはありますか?