// RUN: %clang  -emit-llvm -g -S %s -o - | FileCheck %s

// TAG_member is used to encode debug info for 'z' in A.
// CHECK: TAG_member
class A {
public:
  int z;
};

A *foo (A* x) {
  A *a = new A(*x);
  return a;
}

// Verify that we're not emitting a full definition of B in limit debug mode.
// RUN: %clang -emit-llvm -g -flimit-debug-info -S %s -o - | FileCheck %s
// CHECK-NOT: TAG_member

class B {
public:
  int y;
};

extern int bar(B *b);
int baz(B *b) {
  return bar(b);
}


// RUN: %clang  -emit-llvm -g -S %s -o - | FileCheck %s

// TAG_member is used to encode debug info for 'z' in A.
// CHECK: TAG_member
class A {
public:
  int z;
};

A *foo (A* x) {
  A *a = new A(*x);
  return a;
}


--- 
+++ 
@@ -12,3 +12,17 @@
   return a;
 }
 
+// Verify that we're not emitting a full definition of B in limit debug mode.
+// RUN: %clang -emit-llvm -g -flimit-debug-info -S %s -o - | FileCheck %s
+// CHECK-NOT: TAG_member
+
+class B {
+public:
+  int y;
+};
+
+extern int bar(B *b);
+int baz(B *b) {
+  return bar(b);
+}
+
Add a test to verify that -flimit-debug-info is working in some way.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@181963 91177308-0d34-0410-b5e6-96231b3b80d8
