diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-22 22:49:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-22 22:49:05 +0000 |
commit | 24ea74eb9a47b81c1557926acd83e0fbe6d7594e (patch) | |
tree | 603050bf899b7d3d180b19871d172daf2614520b /lib/VMCore/Verifier.cpp | |
parent | 5dfe767b872988c4f54348afd0d284104d5cd0a0 (diff) | |
download | external_llvm-24ea74eb9a47b81c1557926acd83e0fbe6d7594e.zip external_llvm-24ea74eb9a47b81c1557926acd83e0fbe6d7594e.tar.gz external_llvm-24ea74eb9a47b81c1557926acd83e0fbe6d7594e.tar.bz2 |
Load & StoreInst no longer derive from MemAccessInst, so we don't have
to handle indexing anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 4c9f116..da65b1c 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -330,18 +330,16 @@ void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) { } void Verifier::visitLoadInst(LoadInst &LI) { - const Type *ElTy = LoadInst::getIndexedType(LI.getOperand(0)->getType(), - LI.copyIndices()); - Assert1(ElTy, "Invalid indices for load pointer type!", &LI); + const Type *ElTy = + cast<PointerType>(LI.getOperand(0)->getType())->getElementType(); Assert2(ElTy == LI.getType(), "Load is not of right type for indices!", &LI, ElTy); visitInstruction(LI); } void Verifier::visitStoreInst(StoreInst &SI) { - const Type *ElTy = StoreInst::getIndexedType(SI.getOperand(1)->getType(), - SI.copyIndices()); - Assert1(ElTy, "Invalid indices for store pointer type!", &SI); + const Type *ElTy = + cast<PointerType>(SI.getOperand(1)->getType())->getElementType(); Assert2(ElTy == SI.getOperand(0)->getType(), "Stored value is not of right type for indices!", &SI, ElTy); visitInstruction(SI); |