mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 22:20:37 +00:00
call void @llvm.dbg.declare(metadata !{i32* null}, metadata !1)
is valid, but not useful, when variable identified by !1 is optimized away by the optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98986 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a12971246
commit
608f5a6d48
@ -1623,10 +1623,6 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
|
||||
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:
|
||||
|
12
test/DebugInfo/2010-03-19-DbgDeclare.ll
Normal file
12
test/DebugInfo/2010-03-19-DbgDeclare.ll
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user