[llvm-branch-commits] [llvm-branch] r98987 - in /llvm/branches/Apple/Morbo: lib/VMCore/Verifier.cpp test/DebugInfo/2010-03-19-DbgDeclare.ll

Devang Patel dpatel at apple.com
Fri Mar 19 14:08:13 PDT 2010


Author: dpatel
Date: Fri Mar 19 16:08:13 2010
New Revision: 98987

URL: http://llvm.org/viewvc/llvm-project?rev=98987&view=rev
Log:
Merge r98986 from trunk.

Added:
    llvm/branches/Apple/Morbo/test/DebugInfo/2010-03-19-DbgDeclare.ll
Modified:
    llvm/branches/Apple/Morbo/lib/VMCore/Verifier.cpp

Modified: llvm/branches/Apple/Morbo/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/VMCore/Verifier.cpp?rev=98987&r1=98986&r2=98987&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/VMCore/Verifier.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/VMCore/Verifier.cpp Fri Mar 19 16:08:13 2010
@@ -1623,10 +1623,6 @@
     MDNode *MD = cast<MDNode>(CI.getOperand(1));
     Assert1(MD->getNumOperands() == 1,
                 "invalid llvm.dbg.declare intrinsic call 2", &CI);
-    if (MD->getOperand(0))
-      if (Constant *C = dyn_cast<Constant>(MD->getOperand(0)))
-        Assert1(C && !isa<ConstantPointerNull>(C),
-                "invalid llvm.dbg.declare intrinsic call 3", &CI);
   } break;
   case Intrinsic::memcpy:
   case Intrinsic::memmove:

Added: llvm/branches/Apple/Morbo/test/DebugInfo/2010-03-19-DbgDeclare.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/DebugInfo/2010-03-19-DbgDeclare.ll?rev=98987&view=auto
==============================================================================
--- llvm/branches/Apple/Morbo/test/DebugInfo/2010-03-19-DbgDeclare.ll (added)
+++ llvm/branches/Apple/Morbo/test/DebugInfo/2010-03-19-DbgDeclare.ll Fri Mar 19 16:08:13 2010
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | opt -verify -disable-output
+
+define void @Foo(i32 %a, i32 %b) {
+entry:
+  call void @llvm.dbg.declare(metadata !{i32* null}, metadata !1)
+  ret void
+}
+
+!0 = metadata !{i32 662302, i32 26, metadata !1, null}
+!1 = metadata !{i32 4, metadata !"foo"}
+
+declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone





More information about the llvm-branch-commits mailing list