brintos

brintos / llvm-project-archived public Read only

0
0
Text · 971 B · 714673f Raw
29 lines · plain
1class DummyClass {2  int a_;3 public:4  DummyClass(int a) : a_(a) {}5  int add(int b) {6    return a_ + b;7  }8};9 10int f(int a, int b) {11  DummyClass c(a);12  return c.add(b);13}14 15int 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/dbginfo22// $ cp dwarfdump-test-zlib.cc /tmp/dbginfo23// $ cd /tmp/dbginfo24// $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib -o dwarfdump-test-zlib.elf-x86-6425// $ clang++ -g dwarfdump-test-zlib.cc -Wa,--compress-debug-sections=zlib -c -o dwarfdump-test-zlib.o.elf-x86-6426// $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib-gnu -o dwarfdump-test-zlibgnu.elf-x86-6427// llvm-readobj --sections can be used to see that outputs really contain the compressed sections, also output in both28//   cases is slightly smaller, that is because of compression.29