summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-limited.cpp
blob: f15dce5ce8ef1f05daeada0c5b4199e322a7c483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// 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);
}

OpenPOWER on IntegriCloud