[PATCH] D122516: [MC] Make MCAsmInfo::isAcceptableChar reflect MCAsmInfo::doesAllowAtInName
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 14:01:52 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa8ebd85e463b: [MC] Make MCAsmInfo::isAcceptableChar reflect MCAsmInfo::doesAllowAtInName (authored by efriedma).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122516/new/
https://reviews.llvm.org/D122516
Files:
llvm/lib/MC/MCAsmInfo.cpp
llvm/test/CodeGen/AArch64/ehcontguard.ll
llvm/test/CodeGen/AArch64/win_cst_pool.ll
llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp
Index: llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp
===================================================================
--- llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp
+++ llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp
@@ -554,9 +554,11 @@
}
TEST_F(SystemZAsmLexerLinux, CheckPrintAcceptableSymbol) {
- std::string AsmStr = "ab13_$.@";
+ std::string AsmStr = "ab13_$.";
EXPECT_EQ(true, MAI->isValidUnquotedName(AsmStr));
- AsmStr += "#";
+ AsmStr = "ab13_$.@";
+ EXPECT_EQ(false, MAI->isValidUnquotedName(AsmStr));
+ AsmStr = "ab13_$.#";
EXPECT_EQ(false, MAI->isValidUnquotedName(AsmStr));
}
Index: llvm/test/CodeGen/AArch64/win_cst_pool.ll
===================================================================
--- llvm/test/CodeGen/AArch64/win_cst_pool.ll
+++ llvm/test/CodeGen/AArch64/win_cst_pool.ll
@@ -4,14 +4,14 @@
define double @double() {
ret double 0x2000000000800001
}
-; CHECK: .globl __real at 2000000000800001
-; CHECK-NEXT: .section .rdata,"dr",discard,__real at 2000000000800001
+; CHECK: .globl "__real at 2000000000800001"
+; CHECK-NEXT: .section .rdata,"dr",discard,"__real at 2000000000800001"
; CHECK-NEXT: .p2align 3
-; CHECK-NEXT: __real at 2000000000800001:
+; CHECK-NEXT: "__real at 2000000000800001":
; CHECK-NEXT: .xword 0x2000000000800001
; CHECK: double:
-; CHECK: adrp x8, __real at 2000000000800001
-; CHECK-NEXT: ldr d0, [x8, :lo12:__real at 2000000000800001]
+; CHECK: adrp x8, "__real at 2000000000800001"
+; CHECK-NEXT: ldr d0, [x8, :lo12:"__real at 2000000000800001"]
; CHECK-NEXT: ret
; MINGW: .section .rdata,"dr"
Index: llvm/test/CodeGen/AArch64/ehcontguard.ll
===================================================================
--- llvm/test/CodeGen/AArch64/ehcontguard.ll
+++ llvm/test/CodeGen/AArch64/ehcontguard.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -mtriple=aarch64-windows | FileCheck %s
; EHCont Guard is currently only available on Windows
-; CHECK: .set @feat.00, 16384
+; CHECK: .set "@feat.00", 16384
; CHECK: .section .gehcont$y
Index: llvm/lib/MC/MCAsmInfo.cpp
===================================================================
--- llvm/lib/MC/MCAsmInfo.cpp
+++ llvm/lib/MC/MCAsmInfo.cpp
@@ -114,7 +114,10 @@
}
bool MCAsmInfo::isAcceptableChar(char C) const {
- return isAlnum(C) || C == '_' || C == '$' || C == '.' || C == '@';
+ if (C == '@')
+ return doesAllowAtInName();
+
+ return isAlnum(C) || C == '_' || C == '$' || C == '.';
}
bool MCAsmInfo::isValidUnquotedName(StringRef Name) const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122516.418973.patch
Type: text/x-patch
Size: 2651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220329/51c473c0/attachment.bin>
More information about the llvm-commits
mailing list