aboutsummaryrefslogtreecommitdiffstats
path: root/test/DebugInfo
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2012-12-18 00:31:01 +0000
committerEric Christopher <echristo@gmail.com>2012-12-18 00:31:01 +0000
commit6c583141bf6b7a6b5f8125c1037ecbc089813288 (patch)
tree7e22b30849a5a15a044a3423d0e8df884992ceea /test/DebugInfo
parent2318ba16ef4414eec4bc43eaf6e0703c40e1c580 (diff)
downloadexternal_llvm-6c583141bf6b7a6b5f8125c1037ecbc089813288.zip
external_llvm-6c583141bf6b7a6b5f8125c1037ecbc089813288.tar.gz
external_llvm-6c583141bf6b7a6b5f8125c1037ecbc089813288.tar.bz2
Add support for passing -main-file-name all the way through to
the assembler. Part of PR14624 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r--test/DebugInfo/X86/lit.local.cfg2
-rw-r--r--test/DebugInfo/X86/main-file-name.s17
2 files changed, 18 insertions, 1 deletions
diff --git a/test/DebugInfo/X86/lit.local.cfg b/test/DebugInfo/X86/lit.local.cfg
index 0d694da..60d66ea 100644
--- a/test/DebugInfo/X86/lit.local.cfg
+++ b/test/DebugInfo/X86/lit.local.cfg
@@ -1,4 +1,4 @@
-config.suffixes = ['.ll']
+config.suffixes = ['.ll', '.s']
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
diff --git a/test/DebugInfo/X86/main-file-name.s b/test/DebugInfo/X86/main-file-name.s
new file mode 100644
index 0000000..6817c9e
--- /dev/null
+++ b/test/DebugInfo/X86/main-file-name.s
@@ -0,0 +1,17 @@
+// RUN: llvm-mc -triple x86_64-unknown-linux-gnu -filetype obj -main-file-name foo.S -g -o %t %s
+// RUN: llvm-dwarfdump %t | FileCheck %s
+
+// CHECK: DW_TAG_compile_unit [1]
+// CHECK-NOT: DW_TAG_
+// CHECK: DW_AT_name [DW_FORM_string] ("foo.S")
+
+
+# 1 "foo.S"
+# 1 "<built-in>" 1
+# 1 "foo.S" 2
+
+foo:
+ nop
+ nop
+ nop
+