[llvm] efd805e - MC: Test quoted label
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed May 7 21:16:09 PDT 2025
Author: Fangrui Song
Date: 2025-05-07T21:16:04-07:00
New Revision: efd805ed5591b557d66c95c1ca11701ef7bc897d
URL: https://github.com/llvm/llvm-project/commit/efd805ed5591b557d66c95c1ca11701ef7bc897d
DIFF: https://github.com/llvm/llvm-project/commit/efd805ed5591b557d66c95c1ca11701ef7bc897d.diff
LOG: MC: Test quoted label
Added:
llvm/test/MC/AsmParser/quoted.s
Modified:
Removed:
################################################################################
diff --git a/llvm/test/MC/AsmParser/quoted.s b/llvm/test/MC/AsmParser/quoted.s
new file mode 100644
index 0000000000000..16b0997827603
--- /dev/null
+++ b/llvm/test/MC/AsmParser/quoted.s
@@ -0,0 +1,15 @@
+# RUN: rm -rf %t && split-file %s %t && cd %t
+# RUN: llvm-mc -triple x86_64 a.s | FileCheck %s
+# RUN: not llvm-mc -triple x86_64 err.s 2>&1 | FileCheck %s --check-prefix=ERR
+
+#--- a.s
+# CHECK: .type "a b", at function
+# CHECK: "a b":
+.type "a b", @function
+"a b":
+ call "a b"
+
+#--- err.s
+ "a\":
+# ERR: 1:2: error: unterminated string constant
+# ERR: 1:2: error: unexpected token at start of statement
More information about the llvm-commits
mailing list