While mapping llvm.dbg.declare intrinsic manually map its operand, if possible,
because it points to an alloca instruction through metadata.
llvm-svn: 93757
diff --git a/llvm/test/FrontendC/2010-01-18-Inlined-Debug.c b/llvm/test/FrontendC/2010-01-18-Inlined-Debug.c
new file mode 100644
index 0000000..4aec7b2
--- /dev/null
+++ b/llvm/test/FrontendC/2010-01-18-Inlined-Debug.c
@@ -0,0 +1,12 @@
+// PR: 6058
+// RUN: %llvmgcc -g -S %s -o - | llc -O0 -o /dev/null
+
+static inline int foo(double) __attribute__ ((always_inline));
+static inline int foo(double __x) { return __x; }
+
+void bar(double x) {
+ foo(x);
+}
+
+
+