aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2010-01-20 07:37:49 +0000
committerVictor Hernandez <vhernandez@apple.com>2010-01-20 07:37:49 +0000
commit2ab47098f8711f6fa52de9d1a7ce5d9450f41c43 (patch)
tree047c4bf47e65fcf18aff9ac8e421a72be92befd1 /lib/VMCore
parentea3cb40fab5dc84caa0c6c6bcb650261b4b6e724 (diff)
Backout r93990
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Verifier.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 6e47348995..91517ea7f6 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -1581,7 +1581,7 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
// 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 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
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: