r254117 - Driver: protect from empty -L args
Martell Malone via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 25 17:02:07 PST 2015
Author: martell
Date: Wed Nov 25 19:02:07 2015
New Revision: 254117
URL: http://llvm.org/viewvc/llvm-project?rev=254117&view=rev
Log:
Driver: protect from empty -L args
Differential Revision: http://reviews.llvm.org/D12466
Modified:
cfe/trunk/lib/Driver/ToolChain.cpp
Modified: cfe/trunk/lib/Driver/ToolChain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=254117&r1=254116&r2=254117&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChain.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChain.cpp Wed Nov 25 19:02:07 2015
@@ -619,7 +619,8 @@ void ToolChain::AddCXXStdlibLibArgs(cons
void ToolChain::AddFilePathLibArgs(const ArgList &Args,
ArgStringList &CmdArgs) const {
for (const auto &LibPath : getFilePaths())
- CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
+ if(LibPath.length() > 0)
+ CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
}
void ToolChain::AddCCKextLibArgs(const ArgList &Args,
More information about the cfe-commits
mailing list