summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/Inputs
diff options
context:
space:
mode:
authorAmjad Aboud <amjad.aboud@intel.com>2015-11-12 09:38:54 +0000
committerAmjad Aboud <amjad.aboud@intel.com>2015-11-12 09:38:54 +0000
commite59cc3e540ee7b9840f4bdbe334179340feca6da (patch)
tree9b04b20373ce51ae419b23446f3f133be8d0940f /llvm/test/DebugInfo/Inputs
parentc498ba3a3e39eb94b79e3127eeda8aee2fcfbe68 (diff)
downloadbcm5719-llvm-e59cc3e540ee7b9840f4bdbe334179340feca6da.tar.gz
bcm5719-llvm-e59cc3e540ee7b9840f4bdbe334179340feca6da.zip
dwarfdump: Added macro support to llvm-dwarfdump tool.
Added "macro" option to "-debug-dump" flag, which trigger parsing and dumping of the ".debug_macinfo" section. Differential Revision: http://reviews.llvm.org/D14294 llvm-svn: 252866
Diffstat (limited to 'llvm/test/DebugInfo/Inputs')
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-macro-cmd.h1
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-macro.cc11
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-macro.h5
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-macro.obin0 -> 5616 bytes
4 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-macro-cmd.h b/llvm/test/DebugInfo/Inputs/dwarfdump-macro-cmd.h
new file mode 100644
index 00000000000..1209f66d5fe
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-macro-cmd.h
@@ -0,0 +1 @@
+#define M4 Value4
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-macro.cc b/llvm/test/DebugInfo/Inputs/dwarfdump-macro.cc
new file mode 100644
index 00000000000..42b2c6ab54a
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-macro.cc
@@ -0,0 +1,11 @@
+#define M1 Value1
+#include "dwarfdump-macro.h"
+#define M2(x, y) ((x)+(y)* Value2)
+
+// Built with GCC
+// $ mkdir -p /tmp/dbginfo
+// $ cp dwarfdump-macro.cc /tmp/dbginfo
+// $ cp dwarfdump-macro.h /tmp/dbginfo
+// $ cp dwarfdump-macro-cmd.h /tmp/dbginfo
+// $ cd /tmp/dbginfo
+// $ g++ -c -g3 -O0 -DM3=Value3 -include dwarfdump-macro-cmd.h dwarfdump-macro.cc -o <output>
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-macro.h b/llvm/test/DebugInfo/Inputs/dwarfdump-macro.h
new file mode 100644
index 00000000000..75b35f0e4c2
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-macro.h
@@ -0,0 +1,5 @@
+
+
+
+#undef M1
+#define M1 NewValue1
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-macro.o b/llvm/test/DebugInfo/Inputs/dwarfdump-macro.o
new file mode 100644
index 00000000000..5f1cb5e2707
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-macro.o
Binary files differ
OpenPOWER on IntegriCloud