[llvm-commits] [llvm] r109500 - /llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp
Mikhail Glushenkov
foldr at codedgers.com
Tue Jul 27 04:19:41 PDT 2010
Author: foldr
Date: Tue Jul 27 06:19:40 2010
New Revision: 109500
URL: http://llvm.org/viewvc/llvm-project?rev=109500&view=rev
Log:
Fix silent failure with no input files.
Modified:
llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp
Modified: llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp?rev=109500&r1=109499&r2=109500&view=diff
==============================================================================
--- llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp (original)
+++ llvm/trunk/lib/CompilerDriver/CompilationGraph.cpp Tue Jul 27 06:19:40 2010
@@ -355,6 +355,7 @@
int CompilationGraph::Build (const sys::Path& TempDir,
const LanguageMap& LangMap) {
InputLanguagesSet InLangs;
+ bool WasSomeActionGenerated = !InputFilenames.empty();
// Traverse initial parts of the toolchains and fill in InLangs.
if (int ret = BuildInitial(InLangs, TempDir, LangMap))
@@ -375,6 +376,7 @@
if (JT->JoinListEmpty() && !(JT->WorksOnEmpty() && InputFilenames.empty()))
continue;
+ WasSomeActionGenerated = true;
Action CurAction;
if (int ret = JT->GenerateAction(CurAction, CurNode->HasChildren(),
TempDir, InLangs, LangMap)) {
@@ -401,6 +403,11 @@
}
}
+ if (!WasSomeActionGenerated) {
+ PrintError("no input files");
+ return 1;
+ }
+
return 0;
}
More information about the llvm-commits
mailing list