From e5718bacb9443b982c479cc6a338ee2ac7c38a5f Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 19 Mar 2010 21:06:24 +0000 Subject: 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 --- test/DebugInfo/2010-03-19-DbgDeclare.ll | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/DebugInfo/2010-03-19-DbgDeclare.ll (limited to 'test') diff --git a/test/DebugInfo/2010-03-19-DbgDeclare.ll b/test/DebugInfo/2010-03-19-DbgDeclare.ll new file mode 100644 index 0000000..1f7a889 --- /dev/null +++ b/test/DebugInfo/2010-03-19-DbgDeclare.ll @@ -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 -- cgit v1.1