summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/dsymutil/ARM/dummy-debug-map-amr64.map15
-rw-r--r--llvm/test/tools/dsymutil/ARM/inlined-low_pc.c15
-rw-r--r--llvm/test/tools/dsymutil/ARM/lit.local.cfg3
-rw-r--r--llvm/test/tools/dsymutil/Inputs/inlined-low_pc/1.obin0 -> 1960 bytes
4 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/tools/dsymutil/ARM/dummy-debug-map-amr64.map b/llvm/test/tools/dsymutil/ARM/dummy-debug-map-amr64.map
new file mode 100644
index 00000000000..a23e0c34c3f
--- /dev/null
+++ b/llvm/test/tools/dsymutil/ARM/dummy-debug-map-amr64.map
@@ -0,0 +1,15 @@
+# This is a dummy debug map used for some tests where the contents of the
+# map are just an implementation detail. The tests wanting to use that file
+# should put all there object files in an explicitely named sub-directory
+# of Inputs, and they should be named 1.o, 2.o, ...
+# As not finding an object file or symbols isn't a fatal error for dsymutil,
+# you can extend this file with as much object files and symbols as needed.
+
+---
+triple: 'arm64-apple-darwin'
+objects:
+ - filename: 1.o
+ symbols:
+ - { sym: _bar, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }
+...
+
diff --git a/llvm/test/tools/dsymutil/ARM/inlined-low_pc.c b/llvm/test/tools/dsymutil/ARM/inlined-low_pc.c
new file mode 100644
index 00000000000..7ade33e3e44
--- /dev/null
+++ b/llvm/test/tools/dsymutil/ARM/inlined-low_pc.c
@@ -0,0 +1,15 @@
+/* Compiled with: clang -arch=arm64 -O2 -g -c inlined_low_pc.c */
+
+static int foo(int i) { return 42 + i; }
+int bar(int a) { return foo(a); }
+
+// RUN: llvm-dsymutil -f -y %p/dummy-debug-map-amr64.map -oso-prepend-path %p/../Inputs/inlined-low_pc -o - | llvm-dwarfdump - | FileCheck %s
+
+// CHECK: DW_TAG_subprogram
+// CHECK: DW_AT_low_pc{{.*}}0x0000000000010000
+// CHECK: DW_AT_name{{.*}}"bar"
+// CHECK-NOT: NULL
+// CHECK: DW_TAG_inlined_subroutine
+// CHECK-NEXT: DW_AT_abstract_origin{{.*}}"foo"
+// CHECK-NEXT: DW_AT_low_pc{{.*}}0x0000000000010000
+
diff --git a/llvm/test/tools/dsymutil/ARM/lit.local.cfg b/llvm/test/tools/dsymutil/ARM/lit.local.cfg
index b704ac4031f..442cd554bfe 100644
--- a/llvm/test/tools/dsymutil/ARM/lit.local.cfg
+++ b/llvm/test/tools/dsymutil/ARM/lit.local.cfg
@@ -2,3 +2,6 @@ if not 'ARM' in config.root.targets:
config.unsupported = True
if not 'AArch64' in config.root.targets:
config.unsupported = True
+
+config.suffixes = ['.test', '.cpp', '.c']
+
diff --git a/llvm/test/tools/dsymutil/Inputs/inlined-low_pc/1.o b/llvm/test/tools/dsymutil/Inputs/inlined-low_pc/1.o
new file mode 100644
index 00000000000..7ab4e9205bb
--- /dev/null
+++ b/llvm/test/tools/dsymutil/Inputs/inlined-low_pc/1.o
Binary files differ
OpenPOWER on IntegriCloud