[PATCH] D100359: [COFF] Force Symbols containing '.' to be quoted
Jameson Nash via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 30 14:31:41 PDT 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGea8539111d44: [COFF] Force Symbols containing '.' to be quoted (authored by loladiro, committed by vtjnash).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100359/new/
https://reviews.llvm.org/D100359
Files:
llvm/lib/IR/Mangler.cpp
llvm/test/CodeGen/X86/dllexport.ll
Index: llvm/test/CodeGen/X86/dllexport.ll
===================================================================
--- llvm/test/CodeGen/X86/dllexport.ll
+++ llvm/test/CodeGen/X86/dllexport.ll
@@ -84,6 +84,9 @@
; CHECK: .globl "_complex-name"
@"complex-name" = dllexport global i32 1, align 4
+; CHECK: .globl _complex.name
+@"complex.name" = dllexport global i32 1, align 4
+
; Verify items that should not be exported do not appear in the export table.
; We use a separate check prefix to avoid confusion between -NOT and -SAME.
@@ -106,6 +109,7 @@
; CHECK-CL: .ascii " /EXPORT:_WeakVar1,DATA"
; CHECK-CL: .ascii " /EXPORT:_WeakVar2,DATA"
; CHECK-CL: .ascii " /EXPORT:\"_complex-name\",DATA"
+; CHECK-CL: .ascii " /EXPORT:\"_complex.name\",DATA"
; CHECK-CL: .ascii " /EXPORT:_alias"
; CHECK-CL: .ascii " /EXPORT:_alias2"
; CHECK-CL: .ascii " /EXPORT:_alias3"
@@ -124,6 +128,7 @@
; CHECK-GCC: .ascii " -export:WeakVar1,data"
; CHECK-GCC: .ascii " -export:WeakVar2,data"
; CHECK-GCC: .ascii " -export:\"complex-name\",data"
+; CHECK-GCC: .ascii " -export:\"complex.name\",data"
; CHECK-GCC: .ascii " -export:alias"
; CHECK-GCC: .ascii " -export:alias2"
; CHECK-GCC: .ascii " -export:alias3"
Index: llvm/lib/IR/Mangler.cpp
===================================================================
--- llvm/lib/IR/Mangler.cpp
+++ llvm/lib/IR/Mangler.cpp
@@ -186,7 +186,7 @@
// Check if the name needs quotes to be safe for the linker to interpret.
static bool canBeUnquotedInDirective(char C) {
- return isAlnum(C) || C == '_' || C == '$' || C == '.' || C == '@';
+ return isAlnum(C) || C == '_' || C == '@';
}
static bool canBeUnquotedInDirective(StringRef Name) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100359.369553.patch
Type: text/x-patch
Size: 1683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210830/758f399a/attachment.bin>
More information about the llvm-commits
mailing list