[llvm-commits] [llvm] r42087 - /llvm/trunk/lib/VMCore/Verifier.cpp
Gordon Henriksen
gordonhenriksen at mac.com
Tue Sep 18 03:14:31 PDT 2007
Author: gordon
Date: Tue Sep 18 05:14:30 2007
New Revision: 42087
URL: http://llvm.org/viewvc/llvm-project?rev=42087&view=rev
Log:
Incorporating review feedback for GC verifier patch.
Modified:
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=42087&r1=42086&r2=42087&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Tue Sep 18 05:14:30 2007
@@ -49,8 +49,7 @@
#include "llvm/ParameterAttributes.h"
#include "llvm/DerivedTypes.h"
#include "llvm/InlineAsm.h"
-#include "llvm/Instructions.h"
-#include "llvm/Intrinsics.h"
+#include "llvm/IntrinsicInst.h"
#include "llvm/PassManager.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/CodeGen/ValueTypes.h"
@@ -1078,12 +1077,6 @@
return false;
}
-static Value *StripBitCasts(Value *Val) {
- if (BitCastInst *CI = dyn_cast<BitCastInst>(Val))
- return StripBitCasts(CI->getOperand(0));
- return Val;
-}
-
/// visitIntrinsicFunction - Allow intrinsics to be verified in different ways.
///
void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
@@ -1101,10 +1094,11 @@
case Intrinsic::gcroot:
Assert1(HasPtrPtrType(CI.getOperand(1)),
"llvm.gcroot parameter #1 must be a pointer to a pointer.", &CI);
- Assert1(isa<AllocaInst>(StripBitCasts(CI.getOperand(1))),
- "llvm.gcroot parameter #1 must be an alloca (or a bitcast).", &CI);
+ Assert1(isa<AllocaInst>(IntrinsicInst::StripPointerCasts(CI.getOperand(1))),
+ "llvm.gcroot parameter #1 must be an alloca (or a bitcast of one).",
+ &CI);
Assert1(isa<Constant>(CI.getOperand(2)),
- "llvm.gcroot parameter #2 must be a constant or global.", &CI);
+ "llvm.gcroot parameter #2 must be a constant.", &CI);
break;
case Intrinsic::gcwrite:
Assert1(CI.getOperand(3)->getType()
More information about the llvm-commits
mailing list