aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-22 23:37:20 +0000
committerChris Lattner <sabre@nondot.org>2002-08-22 23:37:20 +0000
commitcc63f1c67456f41b25e8ccb8c1dce72067ddbadf (patch)
tree52db175350fef9c25f1efd36dfbb1f0ee627ce9a /lib/Bytecode
parentd145c2172fc54160c5edf199a1a96fca492e19bc (diff)
downloadexternal_llvm-cc63f1c67456f41b25e8ccb8c1dce72067ddbadf.zip
external_llvm-cc63f1c67456f41b25e8ccb8c1dce72067ddbadf.tar.gz
external_llvm-cc63f1c67456f41b25e8ccb8c1dce72067ddbadf.tar.bz2
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
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Reader/InstructionReader.cpp8
1 files changed, 4 insertions, 4 deletions
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 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
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 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
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 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
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 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
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)