Driver: Stub out Tool::ConstructJob.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67169 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index b41c2fa..a3cd55f 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -706,7 +706,7 @@
// Only use pipes when there is exactly one input.
bool TryToUsePipeInput = Inputs->size() == 1 && T.acceptsPipedInput();
- llvm::SmallVector<InputInfo, 4> InputInfos;
+ InputInfoList InputInfos;
for (ActionList::const_iterator it = Inputs->begin(), ie = Inputs->end();
it != ie; ++it) {
InputInfo II;
@@ -768,7 +768,8 @@
}
llvm::errs() << "], output: " << Result.getAsString() << "\n";
} else {
- assert(0 && "FIXME: Make the job.");
+ const ArgList &TCArgs = C.getArgsForToolChain(TC);
+ T.ConstructJob(C, *JA, Result, InputInfos, TCArgs, LinkingOutput);
}
}
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
new file mode 100644
index 0000000..f849c2b
--- /dev/null
+++ b/lib/Driver/Tools.cpp
@@ -0,0 +1,55 @@
+//===--- Tools.cpp - Tools Implementations ------------------------------*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "Tools.h"
+
+using namespace clang::driver;
+using namespace clang::driver::tools;
+
+void Clang::ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const {
+
+}
+
+void gcc::Preprocess::ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const {
+
+}
+
+void gcc::Precompile::ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const {
+
+}
+
+void gcc::Compile::ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const {
+
+}
+
+void gcc::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const {
+
+}
+
+void gcc::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const {
+
+}
diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h
index 6aaa040..da9d3e2 100644
--- a/lib/Driver/Tools.h
+++ b/lib/Driver/Tools.h
@@ -25,6 +25,11 @@
virtual bool acceptsPipedInput() const { return true; }
virtual bool canPipeOutput() const { return true; }
virtual bool hasIntegratedCPP() const { return true; }
+
+ virtual void ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const;
};
/// gcc - Generic GCC tool implementations.
@@ -36,6 +41,11 @@
virtual bool acceptsPipedInput() const { return true; }
virtual bool canPipeOutput() const { return true; }
virtual bool hasIntegratedCPP() const { return false; }
+
+ virtual void ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const;
};
class VISIBILITY_HIDDEN Precompile : public Tool {
@@ -45,6 +55,11 @@
virtual bool acceptsPipedInput() const { return true; }
virtual bool canPipeOutput() const { return false; }
virtual bool hasIntegratedCPP() const { return true; }
+
+ virtual void ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const;
};
class VISIBILITY_HIDDEN Compile : public Tool {
@@ -54,6 +69,11 @@
virtual bool acceptsPipedInput() const { return true; }
virtual bool canPipeOutput() const { return true; }
virtual bool hasIntegratedCPP() const { return true; }
+
+ virtual void ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const;
};
class VISIBILITY_HIDDEN Assemble : public Tool {
@@ -63,6 +83,11 @@
virtual bool acceptsPipedInput() const { return true; }
virtual bool canPipeOutput() const { return false; }
virtual bool hasIntegratedCPP() const { return false; }
+
+ virtual void ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const;
};
class VISIBILITY_HIDDEN Link : public Tool {
@@ -72,6 +97,11 @@
virtual bool acceptsPipedInput() const { return false; }
virtual bool canPipeOutput() const { return false; }
virtual bool hasIntegratedCPP() const { return false; }
+
+ virtual void ConstructJob(Compilation &C, const JobAction &JA,
+ InputInfo &Output, InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const;
};
} // end namespace gcc