Eliminated the MemAccessInst class, folding contents into GEP class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3487 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp
index 123a94c..0b75c41 100644
--- a/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/lib/Bytecode/Reader/InstructionReader.cpp
@@ -363,7 +363,7 @@
Idx.push_back(V = getValue(TopTy->getIndexType(), Raw.Arg2));
if (!V) return true;
- const Type *ETy = MemAccessInst::getIndexedType(TopTy, Idx, true);
+ const Type *ETy = GetElementPtrInst::getIndexedType(TopTy, Idx, true);
const CompositeType *ElTy = dyn_cast_or_null<CompositeType>(ETy);
if (!ElTy) return true;
@@ -378,7 +378,7 @@
vector<unsigned> &args = *Raw.VarArgs;
for (unsigned i = 0, E = args.size(); i != E; ++i) {
- const Type *ETy = MemAccessInst::getIndexedType(Raw.Ty, Idx, true);
+ const Type *ETy = GetElementPtrInst::getIndexedType(Raw.Ty, Idx, true);
const CompositeType *ElTy = dyn_cast_or_null<CompositeType>(ETy);
if (!ElTy) return true;
Idx.push_back(V = getValue(ElTy->getIndexType(), args[i]));
@@ -393,7 +393,7 @@
if (!Idx.empty()) {
cerr << "WARNING: Bytecode contains load instruction with indices. "
<< "Replacing with getelementptr/load pair\n";
- assert(MemAccessInst::getIndexedType(Raw.Ty, Idx) &&
+ assert(GetElementPtrInst::getIndexedType(Raw.Ty, Idx) &&
"Bad indices for Load!");
Src = new GetElementPtrInst(Src, Idx);
// FIXME: Remove this compatibility code and the BB parameter to this
@@ -429,7 +429,7 @@
Idx.push_back(V = getValue(ElTy->getIndexType(), args[i]));
if (!V) return true;
- const Type *ETy = MemAccessInst::getIndexedType(Raw.Ty, Idx, true);
+ const Type *ETy = GetElementPtrInst::getIndexedType(Raw.Ty, Idx, true);
ElTy = dyn_cast_or_null<CompositeType>(ETy);
}
if (i != E)