という名前の Value* タイプがindexValue
あり、タイプは i32 です。indexValue
タイプがintである数値を保持する必要があると思います。indexValue が指す正確な数値を使用したいので、次のようにします。
ConstantInt* CI = llvm::cast<llvm::ConstantInt>(indexValue); //This is wrong, so is dyn_cast.
uint64_t index = indexValue->getZExtValue();
uint64_t size = index + 1;
それが正しい方法かどうかはわかりません。では、型が i32 である Value* から整数コンテンツを取得する方法を誰か教えてもらえますか?
何か答えがあれば、とても感謝します。