summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/preserve-as-comments.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/preserve-as-comments.c')
-rw-r--r--clang/test/CodeGen/preserve-as-comments.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/preserve-as-comments.c b/clang/test/CodeGen/preserve-as-comments.c
new file mode 100644
index 00000000000..a145ca02633
--- /dev/null
+++ b/clang/test/CodeGen/preserve-as-comments.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -S -fno-preserve-as-comments %s -o - | FileCheck %s --check-prefix=NOASM --check-prefix=CHECK
+// RUN: %clang_cc1 -S %s -o - | FileCheck %s --check-prefix=ASM --check-prefix=CHECK
+
+// CHECK-LABEL: main
+// CHECK: #APP
+// ASM: #comment
+// NOASM-NOT: #comment
+// CHECK: #NO_APP
+int main() {
+ __asm__("/*comment*/");
+ return 0;
+}
OpenPOWER on IntegriCloud