From 51f6ba0998cf5f9c9389e63fba0b58882a4ed0c5 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Thu, 14 Feb 2013 16:10:58 +0000 Subject: [PATCH] Add testcase for llvm-dwarfdump to test parsing of the pubnames data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175168 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/Inputs/dwarfdump-pubnames.cc | 32 ++++++++++++++++++ .../Inputs/dwarfdump-pubnames.elf-x86-64 | Bin 0 -> 5280 bytes test/DebugInfo/dwarfdump-pubnames.test | 16 +++++++++ 3 files changed, 48 insertions(+) create mode 100644 test/DebugInfo/Inputs/dwarfdump-pubnames.cc create mode 100644 test/DebugInfo/Inputs/dwarfdump-pubnames.elf-x86-64 create mode 100644 test/DebugInfo/dwarfdump-pubnames.test diff --git a/test/DebugInfo/Inputs/dwarfdump-pubnames.cc b/test/DebugInfo/Inputs/dwarfdump-pubnames.cc new file mode 100644 index 00000000000..284755bd940 --- /dev/null +++ b/test/DebugInfo/Inputs/dwarfdump-pubnames.cc @@ -0,0 +1,32 @@ +// Object file built using: +// clang -g -mllvm -generate-dwarf-pubnames -o dwarfdump-pubnames.elf-x86_64 \ +// dwarfdump-pubnames.cc -c + +struct C { + void member_function(); + static int static_member_function(); + static int static_member_variable; +}; + +int C::static_member_variable = 0; + +void C::member_function() { + static_member_variable = 0; +} + +int C::static_member_function() { + return static_member_variable; +} + +C global_variable; + +int global_function() { + return -1; +} + +namespace ns { + void global_namespace_function() { + global_variable.member_function(); + } + int global_namespace_variable = 1; +} diff --git a/test/DebugInfo/Inputs/dwarfdump-pubnames.elf-x86-64 b/test/DebugInfo/Inputs/dwarfdump-pubnames.elf-x86-64 new file mode 100644 index 0000000000000000000000000000000000000000..3c9c1ad56b38d06824fa9d7d2225ecbee76f8d0a GIT binary patch literal 5280 zcmbtYO>9(E6u!5wrL@yde@27?(TM^=B5!`$DJ@hw1PZMhjGBrVNPY9>O*>&aoy@$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