[COFF] Force Symbols containing '.' to be quoted
authorKeno Fischer <keno@juliacomputing.com>
Thu, 19 Aug 2021 18:31:39 +0000 (14:31 -0400)
committerJameson Nash <vtjnash@gmail.com>
Mon, 30 Aug 2021 21:26:57 +0000 (17:26 -0400)
commitea8539111d444ffb93ab09c5865d9a1a0927cb2c
treef0369a46612a8caab762a4fa108ba1a3c36004a8
parent30dfd3449e45ac371012c6e46c77ab9089496d4e
[COFF] Force Symbols containing '.' to be quoted

In D87099, the mangler learned to quote export directives that contain
special characters. Only alhpanumerical characters as well as
'_', '$', '.' and '@' were exmpt from this quoting. However, at least
binutils considers an unquoted '.' to be syntax and object files
containing such symbols will cause errors during linking. Fix that
by removing '.' from the list of allowed exemptions.

Differential Revision: https://reviews.llvm.org/D100359
llvm/lib/IR/Mangler.cpp
llvm/test/CodeGen/X86/dllexport.ll