[llvm-commits] [llvm] r93995 - /llvm/trunk/lib/VMCore/Verifier.cpp
Victor Hernandez
vhernandez at apple.com
Tue Jan 19 23:37:49 PST 2010
Author: hernande
Date: Wed Jan 20 01:37:49 2010
New Revision: 93995
URL: http://llvm.org/viewvc/llvm-project?rev=93995&view=rev
Log:
Backout r93990
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=93995&r1=93994&r2=93995&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Wed Jan 20 01:37:49 2010
@@ -1581,7 +1581,7 @@
// If the intrinsic takes MDNode arguments, verify that they are either global
// or are local to *this* function.
- for (unsigned i = 1, e = CI.getNumOperands(); i != e; ++i)
+ for (unsigned i = 0, e = CI.getNumOperands(); i != e; ++i)
if (MDNode *MD = dyn_cast<MDNode>(CI.getOperand(i))) {
if (!MD->isFunctionLocal()) continue;
SmallPtrSet<MDNode *, 32> Visited;
@@ -1591,17 +1591,12 @@
switch (ID) {
default:
break;
- case Intrinsic::dbg_declare: { // llvm.dbg.declare
- Assert1(CI.getOperand(1) && isa<MDNode>(CI.getOperand(1)),
- "invalid llvm.dbg.declare intrinsic call", &CI);
- MDNode *MD = cast<MDNode>(CI.getOperand(1));
- Assert1(MD->getNumOperands() == 1,
- "invalid llvm.dbg.declare intrinsic call", &CI);
- if (MD->getOperand(0))
+ case Intrinsic::dbg_declare: // llvm.dbg.declare
+ if (MDNode *MD = dyn_cast<MDNode>(CI.getOperand(1)))
if (Constant *C = dyn_cast<Constant>(MD->getOperand(0)))
Assert1(C && !isa<ConstantPointerNull>(C),
"invalid llvm.dbg.declare intrinsic call", &CI);
- } break;
+ break;
case Intrinsic::memcpy:
case Intrinsic::memmove:
case Intrinsic::memset:
More information about the llvm-commits
mailing list