[PATCH] D39327: [COFF] Support ordinals in def files with space between @ and the number
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 03:30:51 PDT 2017
mstorsjo created this revision.
Both GNU ld and MS link.exe support declaring ordinals this way.
A test will be added in lld.
https://reviews.llvm.org/D39327
Files:
lib/Object/COFFModuleDefinition.cpp
Index: lib/Object/COFFModuleDefinition.cpp
===================================================================
--- lib/Object/COFFModuleDefinition.cpp
+++ lib/Object/COFFModuleDefinition.cpp
@@ -250,7 +250,10 @@
for (;;) {
read();
if (Tok.K == Identifier && Tok.Value[0] == '@') {
- if (Tok.Value.drop_front().getAsInteger(10, E.Ordinal)) {
+ if (Tok.Value == "@") {
+ read();
+ Tok.Value.getAsInteger(10, E.Ordinal);
+ } else if (Tok.Value.drop_front().getAsInteger(10, E.Ordinal)) {
// Not an ordinal modifier at all, but the next export (fastcall
// decorated) - complete the current one.
unget();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39327.120381.patch
Type: text/x-patch
Size: 692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171026/e3a67096/attachment.bin>
More information about the llvm-commits
mailing list