diff options
author | Reid Kleckner <rnk@google.com> | 2017-10-16 23:07:15 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-10-16 23:07:15 +0000 |
commit | 400a64e81b5a297f88a789573c89fe08c60bf914 (patch) | |
tree | f07f40d074efcf6a8ae4ce46be534978fae15694 /clang/test/Preprocessor/print-assembler.s | |
parent | cf3ab11caa9bf21fbe9ea7e1c300d8f60c320f4d (diff) | |
download | bcm5719-llvm-400a64e81b5a297f88a789573c89fe08c60bf914.tar.gz bcm5719-llvm-400a64e81b5a297f88a789573c89fe08c60bf914.zip |
Don't print end-of-directive tokens in -E output
This comes up when pre-processing standalone .s files containing
hash-prefixed comments. The pre-processor should skip the unknown
directive and not emit an extra newline as we were doing.
Fixes PR34950
llvm-svn: 315953
Diffstat (limited to 'clang/test/Preprocessor/print-assembler.s')
-rw-r--r-- | clang/test/Preprocessor/print-assembler.s | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/print-assembler.s b/clang/test/Preprocessor/print-assembler.s new file mode 100644 index 00000000000..c4e2e031f2d --- /dev/null +++ b/clang/test/Preprocessor/print-assembler.s @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -E -x assembler-with-cpp %s -o - | FileCheck %s --strict-whitespace + +.intel_syntax noprefix +.text + .global _main +_main: +# asdf +# asdf + mov bogus_name, 20 + mov rax, 5 + ret + +// CHECK-LABEL: _main: +// CHECK-NEXT: {{^}} # asdf +// CHECK-NEXT: {{^}} # asdf +// CHECK-NEXT: mov bogus_name, 20 |