• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 class DummyClass {
2   int a_;
3  public:
DummyClass(int a)4   DummyClass(int a) : a_(a) {}
add(int b)5   int add(int b) {
6     return a_ + b;
7   }
8 };
9 
f(int a,int b)10 int f(int a, int b) {
11   DummyClass c(a);
12   return c.add(b);
13 }
14 
main()15 int main() {
16   return f(2, 3);
17 }
18 
19 // Built with Clang 3.9 and GNU gold (GNU Binutils for Ubuntu 2.26) 1.11:
20 // Note: llvm-symbolizer-zlib.test relies on the path and filename used !
21 // $ mkdir -p /tmp/dbginfo
22 // $ cp dwarfdump-test-zlib.cc /tmp/dbginfo
23 // $ cd /tmp/dbginfo
24 // $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib -o dwarfdump-test-zlib.elf-x86-64
25 // $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib-gnu -o dwarfdump-test-zlibgnu.elf-x86-64
26 // llvm-readobj -sections can be used to see that outputs really contain the compressed sections, also output in both
27 //   cases is slightly smaller, that is because of compression.