[lld] r241316 - COFF: Fix a bug that /delayload was case-sensitive.
Rui Ueyama
ruiu at google.com
Thu Jul 2 18:40:14 PDT 2015
Author: ruiu
Date: Thu Jul 2 20:40:14 2015
New Revision: 241316
URL: http://llvm.org/viewvc/llvm-project?rev=241316&view=rev
Log:
COFF: Fix a bug that /delayload was case-sensitive.
Modified:
lld/trunk/COFF/Config.h
lld/trunk/COFF/Driver.cpp
lld/trunk/COFF/Writer.cpp
lld/trunk/test/COFF/delayimports.test
Modified: lld/trunk/COFF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Config.h?rev=241316&r1=241315&r2=241316&view=diff
==============================================================================
--- lld/trunk/COFF/Config.h (original)
+++ lld/trunk/COFF/Config.h Thu Jul 2 20:40:14 2015
@@ -59,7 +59,7 @@ struct Configuration {
bool DLL = false;
StringRef Implib;
std::vector<Export> Exports;
- std::set<StringRef> DelayLoads;
+ std::set<std::string> DelayLoads;
// Used for /opt:icf
bool ICF = false;
Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=241316&r1=241315&r2=241316&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Thu Jul 2 20:40:14 2015
@@ -421,7 +421,7 @@ bool LinkerDriver::link(llvm::ArrayRef<c
// Handle /delayload
for (auto *Arg : Args.filtered(OPT_delayload)) {
- Config->DelayLoads.insert(Arg->getValue());
+ Config->DelayLoads.insert(StringRef(Arg->getValue()).lower());
addUndefined("__delayLoadHelper2");
}
Modified: lld/trunk/COFF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.cpp?rev=241316&r1=241315&r2=241316&view=diff
==============================================================================
--- lld/trunk/COFF/Writer.cpp (original)
+++ lld/trunk/COFF/Writer.cpp Thu Jul 2 20:40:14 2015
@@ -222,7 +222,7 @@ void Writer::createImportTables() {
Text->addChunk(cast<DefinedImportThunk>(B)->getChunk());
continue;
}
- if (Config->DelayLoads.count(Import->getDLLName())) {
+ if (Config->DelayLoads.count(Import->getDLLName().lower())) {
DelayIdata.add(Import);
} else {
Idata.add(Import);
Modified: lld/trunk/test/COFF/delayimports.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/delayimports.test?rev=241316&r1=241315&r2=241316&view=diff
==============================================================================
--- lld/trunk/test/COFF/delayimports.test (original)
+++ lld/trunk/test/COFF/delayimports.test Thu Jul 2 20:40:14 2015
@@ -1,5 +1,5 @@
# RUN: lld -flavor link2 /out:%t.exe /entry:main /subsystem:console \
-# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib /delayload:std64.dll \
+# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib /delayload:std64.DLL \
# RUN: /alternatename:__delayLoadHelper2=main
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
More information about the llvm-commits
mailing list