]> granicus.if.org Git - clang/commitdiff
[cc1as] Test that -g of empty .s file does something sensible.
authorPaul Robinson <paul.robinson@sony.com>
Tue, 29 Jan 2019 20:57:50 +0000 (20:57 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Tue, 29 Jan 2019 20:57:50 +0000 (20:57 +0000)
Depends on LLVM r352541.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352542 91177308-0d34-0410-b5e6-96231b3b80d8

test/Misc/cc1as-asm-debug.s [new file with mode: 0644]

diff --git a/test/Misc/cc1as-asm-debug.s b/test/Misc/cc1as-asm-debug.s
new file mode 100644 (file)
index 0000000..cd36cad
--- /dev/null
@@ -0,0 +1,11 @@
+// Run cc1as with debug on empty file. Needs a known name so we can check it.
+// REQUIRES: x86-registered-target
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: cp %s %t/comment.s
+// RUN: %clang -cc1as -triple x86_64-linux-gnu -filetype asm -debug-info-kind=limited -dwarf-version=4 %t/comment.s | FileCheck %s
+// RUN: %clang -cc1as -triple x86_64-linux-gnu -filetype asm -debug-info-kind=limited -dwarf-version=5 %t/comment.s | FileCheck %s
+// Asm output actually emits the .section directives twice.
+// CHECK: {{\.}}section .debug_info
+// CHECK: {{\.}}section .debug_info
+// CHECK-NOT: {{\.}}section
+// CHECK: .ascii "comment.s"