about summary refs log tree commit diff
path: root/tests/assembly-llvm/asm/comments.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/assembly-llvm/asm/comments.rs')
-rw-r--r--tests/assembly-llvm/asm/comments.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/assembly-llvm/asm/comments.rs b/tests/assembly-llvm/asm/comments.rs
new file mode 100644
index 00000000000..557009975dd
--- /dev/null
+++ b/tests/assembly-llvm/asm/comments.rs
@@ -0,0 +1,12 @@
+//@ assembly-output: emit-asm
+//@ only-x86_64
+// Check that comments in assembly get passed
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: test_comments:
+#[no_mangle]
+pub fn test_comments() {
+    // CHECK: example comment
+    unsafe { core::arch::asm!("nop // example comment") };
+}