[PATCH] D39968: [COFF] Ignore semicolons in module definition identifiers
David Major via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 09:20:14 PST 2017
dmajor updated this revision to Diff 123607.
dmajor added a comment.
Herald added a subscriber: mehdi_amini.
Added a test. If this looks OK, do you mind landing it for me?
https://reviews.llvm.org/D39968
Files:
lib/Object/COFFModuleDefinition.cpp
test/tools/llvm-dlltool/coff-exports.def
Index: test/tools/llvm-dlltool/coff-exports.def
===================================================================
--- test/tools/llvm-dlltool/coff-exports.def
+++ test/tools/llvm-dlltool/coff-exports.def
@@ -5,11 +5,17 @@
LIBRARY test.dll
EXPORTS
-TestFunction
+TestFunction1
+TestFunction2;
+TestFunction3 ; This is a comment
; CHECK: File: test.dll
; CHECK: Format: COFF-import-file
; CHECK: Type: code
; CHECK: Name type: name
-; CHECK: Symbol: __imp_TestFunction
-; CHECK: Symbol: TestFunction
+; CHECK: Symbol: __imp_TestFunction1
+; CHECK: Symbol: TestFunction1
+; CHECK: Symbol: __imp_TestFunction2{{$}}
+; CHECK: Symbol: TestFunction2{{$}}
+; CHECK: Symbol: __imp_TestFunction3{{$}}
+; CHECK: Symbol: TestFunction3{{$}}
Index: lib/Object/COFFModuleDefinition.cpp
===================================================================
--- lib/Object/COFFModuleDefinition.cpp
+++ lib/Object/COFFModuleDefinition.cpp
@@ -117,7 +117,7 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39968.123607.patch
Type: text/x-patch
Size: 1252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171120/c215dfc9/attachment.bin>
More information about the llvm-commits
mailing list