diff options
Diffstat (limited to 'test/DebugInfo/Inputs/dwarfdump-test.cc')
-rw-r--r-- | test/DebugInfo/Inputs/dwarfdump-test.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/DebugInfo/Inputs/dwarfdump-test.cc b/test/DebugInfo/Inputs/dwarfdump-test.cc new file mode 100644 index 0000000..4089998 --- /dev/null +++ b/test/DebugInfo/Inputs/dwarfdump-test.cc @@ -0,0 +1,23 @@ +class DummyClass { + int a_; + public: + DummyClass(int a) : a_(a) {} + int add(int b) { + return a_ + b; + } +}; + +int f(int a, int b) { + DummyClass c(a); + return c.add(b); +} + +int main() { + return f(2, 3); +} + +// Built with Clang 3.2: +// $ mkdir -p /tmp/dbginfo +// $ cp dwarfdump-test.cc /tmp/dbginfo +// $ cd /tmp/dbginfo +// $ clang++ -g dwarfdump-test.cc -o <output> |