~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/DebugInfo/Inputs/dwarfdump-pubnames.cc

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Object file built using:
 
2
// clang -g -mllvm -generate-dwarf-pubnames -o dwarfdump-pubnames.elf-x86_64 \
 
3
//    dwarfdump-pubnames.cc  -c
 
4
 
 
5
struct C {
 
6
  void member_function();
 
7
  static int static_member_function();
 
8
  static int static_member_variable;
 
9
};
 
10
 
 
11
int C::static_member_variable = 0;
 
12
 
 
13
void C::member_function() {
 
14
  static_member_variable = 0;
 
15
}
 
16
 
 
17
int C::static_member_function() {
 
18
  return static_member_variable;
 
19
}
 
20
 
 
21
C global_variable;
 
22
 
 
23
int global_function() {
 
24
  return -1;
 
25
}
 
26
 
 
27
namespace ns {
 
28
  void global_namespace_function() {
 
29
    global_variable.member_function();
 
30
  }
 
31
  int global_namespace_variable = 1;
 
32
}