[lld] r187100 - [PECOFF][Driver] Allow multiple /include options.
Rui Ueyama
ruiu at google.com
Wed Jul 24 19:57:40 PDT 2013
Author: ruiu
Date: Wed Jul 24 21:57:39 2013
New Revision: 187100
URL: http://llvm.org/viewvc/llvm-project?rev=187100&view=rev
Log:
[PECOFF][Driver] Allow multiple /include options.
Modified:
lld/trunk/lib/Driver/WinLinkDriver.cpp
lld/trunk/test/pecoff/include.test
Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=187100&r1=187099&r2=187100&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Wed Jul 24 21:57:39 2013
@@ -373,8 +373,11 @@ bool WinLinkDriver::parse(int argc, cons
info.setTerminalServerAware(false);
// handle /include
- if (llvm::opt::Arg *sym = parsedArgs->getLastArg(OPT_incl))
- info.addInitialUndefinedSymbol(sym->getValue());
+ for (llvm::opt::arg_iterator it = parsedArgs->filtered_begin(OPT_incl),
+ ie = parsedArgs->filtered_end();
+ it != ie; ++it) {
+ info.addInitialUndefinedSymbol((*it)->getValue());
+ }
// handle /out
if (llvm::opt::Arg *outpath = parsedArgs->getLastArg(OPT_out))
Modified: lld/trunk/test/pecoff/include.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/include.test?rev=187100&r1=187099&r2=187100&view=diff
==============================================================================
--- lld/trunk/test/pecoff/include.test (original)
+++ lld/trunk/test/pecoff/include.test Wed Jul 24 21:57:39 2013
@@ -1,7 +1,8 @@
# RUN: yaml2obj %p/Inputs/nop.obj.yaml > %t.obj
#
# RUN: not lld -flavor link /out:%t1 /subsystem:console \
-# RUN: /include:nosuchsym -- %t.obj 2> %t1
+# RUN: /include:sym1 /include:sym2 -- %t.obj 2> %t1
# RUN: FileCheck %s < %t1
-CHECK: Undefined Symbol: Linker Internal File : nosuchsym
\ No newline at end of file
+CHECK: Undefined Symbol: Linker Internal File : sym1
+CHECK: Undefined Symbol: Linker Internal File : sym2
More information about the llvm-commits
mailing list