summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/tools/dsymutil/Inputs/sibling.obin0 -> 1748 bytes
-rw-r--r--llvm/test/tools/dsymutil/PowerPC/lit.local.cfg4
-rw-r--r--llvm/test/tools/dsymutil/PowerPC/sibling.test20
3 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/tools/dsymutil/Inputs/sibling.o b/llvm/test/tools/dsymutil/Inputs/sibling.o
new file mode 100644
index 00000000000..01daa1cad0b
--- /dev/null
+++ b/llvm/test/tools/dsymutil/Inputs/sibling.o
Binary files differ
diff --git a/llvm/test/tools/dsymutil/PowerPC/lit.local.cfg b/llvm/test/tools/dsymutil/PowerPC/lit.local.cfg
new file mode 100644
index 00000000000..6e3d1def04e
--- /dev/null
+++ b/llvm/test/tools/dsymutil/PowerPC/lit.local.cfg
@@ -0,0 +1,4 @@
+if not 'PowerPC' in config.root.targets:
+ config.unsupported = True
+
+config.suffixes = ['.test', '.cpp', '.c']
diff --git a/llvm/test/tools/dsymutil/PowerPC/sibling.test b/llvm/test/tools/dsymutil/PowerPC/sibling.test
new file mode 100644
index 00000000000..3f93cd37c81
--- /dev/null
+++ b/llvm/test/tools/dsymutil/PowerPC/sibling.test
@@ -0,0 +1,20 @@
+# Verify that we don't follow DW_AT_sibling references.
+#
+# Source:
+# struct A { int a; } a;
+# struct B { int b; } b;
+
+# RUN: llvm-dsymutil -arch ppc -f -oso-prepend-path=%p/../Inputs/ -y %s -o - | llvm-dwarfdump -debug-info - | FileCheck %s
+
+# CHECK: DW_TAG_variable
+# CHECK-NEXT: DW_AT_name ("a")
+# CHECK-NOT: DW_AT_name ("b")
+
+---
+triple: 'ppc-apple-darwin'
+objects:
+ - filename: sibling.o
+ timestamp: 1518197670
+ symbols:
+ - { sym: _a, objAddr: 0x00000000000000cb, binAddr: 0x0000000100000FA0, size: 0x00000010 }
+...
OpenPOWER on IntegriCloud