diff options
author | Rui Ueyama <ruiu@google.com> | 2017-12-06 19:18:24 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-12-06 19:18:24 +0000 |
commit | efb5024e571b5c5bf922152eb226ec6b887e2084 (patch) | |
tree | f3dd7fac748996e6baf947ac74bfb3ee86c2af21 /llvm/lib/Object/COFFModuleDefinition.cpp | |
parent | b6e2ca4597d309c98be17e2bcc8a69ac22c25afe (diff) | |
download | bcm5719-llvm-efb5024e571b5c5bf922152eb226ec6b887e2084.tar.gz bcm5719-llvm-efb5024e571b5c5bf922152eb226ec6b887e2084.zip |
[COFF] Ignore semicolons in module definition identifiers
Patch by David Major.
The NSS project's .def files make heavy use of semicolons in a
frightening attempt at portability:
https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/capi/nsscapi.def
lld-link was treating the semicolon as part of the export name,
resulting in unresolved symbols. This patch includes ';' in the list of
characters to split on.
Differential Revision: https://reviews.llvm.org/D39968
llvm-svn: 319933
Diffstat (limited to 'llvm/lib/Object/COFFModuleDefinition.cpp')
-rw-r--r-- | llvm/lib/Object/COFFModuleDefinition.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFModuleDefinition.cpp b/llvm/lib/Object/COFFModuleDefinition.cpp index e2208016eb5..a571354648d 100644 --- a/llvm/lib/Object/COFFModuleDefinition.cpp +++ b/llvm/lib/Object/COFFModuleDefinition.cpp @@ -117,7 +117,7 @@ public: return Token(Identifier, S); } default: { - size_t End = Buf.find_first_of("=,\r\n \t\v"); + size_t End = Buf.find_first_of("=,;\r\n \t\v"); StringRef Word = Buf.substr(0, End); Kind K = llvm::StringSwitch<Kind>(Word) .Case("BASE", KwBase) |