summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-06-27 05:32:09 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-06-27 05:32:09 +0000
commiteffea626e2ccff375d98a3f560c3cd6514190aa7 (patch)
tree14968473a6491484a9cef18cca784fdc03526fba /test
parent150f5b89206d080955b84d303f78e54864c4070f (diff)
downloadllvm-effea626e2ccff375d98a3f560c3cd6514190aa7.tar.gz
llvm-effea626e2ccff375d98a3f560c3cd6514190aa7.tar.bz2
llvm-effea626e2ccff375d98a3f560c3cd6514190aa7.tar.xz
ArgumentPromotion: Propagate debug locations on calls for which arguments are promoted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/ArgumentPromotion/dbg.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/ArgumentPromotion/dbg.ll b/test/Transforms/ArgumentPromotion/dbg.ll
new file mode 100644
index 0000000000..a991bbc221
--- /dev/null
+++ b/test/Transforms/ArgumentPromotion/dbg.ll
@@ -0,0 +1,17 @@
+; RUN: opt < %s -argpromotion -S | FileCheck %s
+; CHECK: call void @test(), !dbg !1
+target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
+define internal void @test(i32* %X) {
+ ret void
+}
+
+define void @caller() {
+ call void @test(i32* null), !dbg !1
+ ret void
+}
+
+!llvm.module.flags = !{!3}
+
+!1 = metadata !{i32 8, i32 0, metadata !2, null}
+!2 = metadata !{}
+!3 = metadata !{i32 2, metadata !"Debug Info Version", i32 1}