aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CompilerDriver/CompilationGraph.cpp
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-07-27 11:19:40 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-07-27 11:19:40 +0000
commitf6eb5cdb00c8edad7b7e6b5f0d93a986eb1c20f8 (patch)
treedca730d3a8136dc087dcc1de87d05bf8c71fd07c /lib/CompilerDriver/CompilationGraph.cpp
parentb613c396c944f7a0e9556c23c7e89ea76005dc29 (diff)
downloadexternal_llvm-f6eb5cdb00c8edad7b7e6b5f0d93a986eb1c20f8.zip
external_llvm-f6eb5cdb00c8edad7b7e6b5f0d93a986eb1c20f8.tar.gz
external_llvm-f6eb5cdb00c8edad7b7e6b5f0d93a986eb1c20f8.tar.bz2
Fix silent failure with no input files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CompilerDriver/CompilationGraph.cpp')
-rw-r--r--lib/CompilerDriver/CompilationGraph.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CompilerDriver/CompilationGraph.cpp b/lib/CompilerDriver/CompilationGraph.cpp
index 9ea69c1..259911f 100644
--- a/lib/CompilerDriver/CompilationGraph.cpp
+++ b/lib/CompilerDriver/CompilationGraph.cpp
@@ -355,6 +355,7 @@ TopologicalSortFilterJoinNodes(std::vector<const Node*>& Out) {
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 @@ int CompilationGraph::Build (const sys::Path& TempDir,
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 @@ int CompilationGraph::Build (const sys::Path& TempDir,
}
}
+ if (!WasSomeActionGenerated) {
+ PrintError("no input files");
+ return 1;
+ }
+
return 0;
}