summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/InstructionReader.cpp
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
commitdfb3a2cd07da96e9052ddd27bfef0d39b4587682 (patch)
tree82d36d1daf237563eba92c8c088547d80882373f /llvm/lib/Bytecode/Reader/InstructionReader.cpp
parentbacb7273e8a1855cbf43dd3acf96657473a8344a (diff)
downloadbcm5719-llvm-dfb3a2cd07da96e9052ddd27bfef0d39b4587682.tar.gz
bcm5719-llvm-dfb3a2cd07da96e9052ddd27bfef0d39b4587682.zip
Eliminated the MemAccessInst class, folding contents into GEP class.
llvm-svn: 3487
Diffstat (limited to 'llvm/lib/Bytecode/Reader/InstructionReader.cpp')
-rw-r--r--llvm/lib/Bytecode/Reader/InstructionReader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Bytecode/Reader/InstructionReader.cpp b/llvm/lib/Bytecode/Reader/InstructionReader.cpp
index 123a94c9dc5..0b75c41b008 100644
--- a/llvm/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud