A constructor call should force class's debug info even if -flimit-debug-info is enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126246 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/debug-info-limit.cpp b/test/CodeGenCXX/debug-info-limit.cpp
new file mode 100644
index 0000000..75f9271
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-limit.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang  -emit-llvm -g -S %s -o - | FileCheck %s
+
+// TAG_member is used to encode debug info for class constructor.
+// CHECK: TAG_member
+class A {
+public:
+  int z;
+};
+
+A *foo () {
+  A *a = new A();
+  return a;
+}
+