mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 04:31:08 +00:00
Inching our way towards fixing PR82
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10721 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a25b3557a1
commit
258b5375b4
@ -354,7 +354,10 @@ void BytecodeParser::ParseInstruction(const unsigned char *&Buf,
|
|||||||
for (unsigned i = 1, e = Args.size(); i != e; ++i) {
|
for (unsigned i = 1, e = Args.size(); i != e; ++i) {
|
||||||
const CompositeType *TopTy = dyn_cast_or_null<CompositeType>(NextTy);
|
const CompositeType *TopTy = dyn_cast_or_null<CompositeType>(NextTy);
|
||||||
if (!TopTy) throw std::string("Invalid getelementptr instruction!");
|
if (!TopTy) throw std::string("Invalid getelementptr instruction!");
|
||||||
Idx.push_back(getValue(TopTy->getIndexType()->getPrimitiveID(), Args[i]));
|
// FIXME: when PR82 is resolved.
|
||||||
|
unsigned IdxTy = isa<StructType>(TopTy) ? Type::UByteTyID :Type::LongTyID;
|
||||||
|
|
||||||
|
Idx.push_back(getValue(IdxTy, Args[i]));
|
||||||
NextTy = GetElementPtrInst::getIndexedType(InstTy, Idx, true);
|
NextTy = GetElementPtrInst::getIndexedType(InstTy, Idx, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user