[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 13:12:10 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316690: [COFF] Support ordinals in def files with space between @ and the number (authored by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D39327?vs=120381&id=120470#toc
Repository:
rL LLVM
https://reviews.llvm.org/D39327
Files:
llvm/trunk/lib/Object/COFFModuleDefinition.cpp
Index: llvm/trunk/lib/Object/COFFModuleDefinition.cpp
===================================================================
--- llvm/trunk/lib/Object/COFFModuleDefinition.cpp
+++ llvm/trunk/lib/Object/COFFModuleDefinition.cpp
@@ -250,13 +250,18 @@
for (;;) {
read();
if (Tok.K == Identifier && Tok.Value[0] == '@') {
- 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.
+ if (Tok.Value == "@") {
+ // "foo @ 10"
+ read();
+ Tok.Value.getAsInteger(10, E.Ordinal);
+ } else if (Tok.Value.drop_front().getAsInteger(10, E.Ordinal)) {
+ // "foo \n @bar" - Not an ordinal modifier at all, but the next
+ // export (fastcall decorated) - complete the current one.
unget();
Info.Exports.push_back(E);
return Error::success();
}
+ // "foo @10"
read();
if (Tok.K == KwNoname) {
E.Noname = true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39327.120470.patch
Type: text/x-patch
Size: 1082 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171026/7e6a9602/attachment.bin>
More information about the llvm-commits
mailing list