aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-13 22:12:33 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-13 22:12:33 +0000
commit57b704d8d8f49bcaf856a3e37941d5ac6456eb50 (patch)
tree02dcbda0a04af35e9803575137278fafcda64d5d
parent159715fbbe9c018c9e374a880a92bd55514a9c18 (diff)
Driver: Sprinkle some consts in, stub out BuildJobs method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66968 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Driver/Driver.h26
-rw-r--r--lib/Driver/Driver.cpp15
2 files changed, 24 insertions, 17 deletions
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h
index 896c844bd6..33d17ef100 100644
--- a/include/clang/Driver/Driver.h
+++ b/include/clang/Driver/Driver.h
@@ -37,12 +37,8 @@ class Driver {
Diagnostic &Diags;
- /// ParseArgStrings - Parse the given list of strings into an
- /// ArgList.
- ArgList *ParseArgStrings(const char **ArgBegin, const char **ArgEnd);
-
// Diag - Forwarding function for diagnostics.
- DiagnosticBuilder Diag(unsigned DiagID) {
+ DiagnosticBuilder Diag(unsigned DiagID) const {
return Diags.Report(FullSourceLoc(), DiagID);
}
@@ -123,19 +119,27 @@ public:
/// @name Driver Steps
/// @{
- /// BuildUniversalActions - Construct the list of actions to perform
- /// for the given arguments, which may require a universal build.
+ /// ParseArgStrings - Parse the given list of strings into an
+ /// ArgList.
+ ArgList *ParseArgStrings(const char **ArgBegin, const char **ArgEnd);
+
+ /// BuildActions - Construct the list of actions to perform for the
+ /// given arguments, which are only done for a single architecture.
///
/// \param Args - The input arguments.
/// \param Actions - The list to store the resulting actions onto.
- void BuildUniversalActions(ArgList &Args, ActionList &Actions);
+ void BuildActions(ArgList &Args, ActionList &Actions) const;
- /// BuildActions - Construct the list of actions to perform for the
- /// given arguments, which are only done for a single architecture.
+ /// BuildUniversalActions - Construct the list of actions to perform
+ /// for the given arguments, which may require a universal build.
///
/// \param Args - The input arguments.
/// \param Actions - The list to store the resulting actions onto.
- void BuildActions(ArgList &Args, ActionList &Actions);
+ void BuildUniversalActions(ArgList &Args, ActionList &Actions) const;
+
+ /// BuildJobs - Bind actions to concrete tools and translate
+ /// arguments to form the list of jobs to run.
+ Compilation *BuildJobs(const ArgList &Args, const ActionList &Actions) const;
/// @}
/// @name Helper Methods
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index ee8a649d1a..cbd03a331b 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -171,10 +171,7 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
return 0;
}
-
- assert(0 && "FIXME: Implement");
-
- return new Compilation();
+ return BuildJobs(*Args, Actions);
}
void Driver::PrintOptions(const ArgList &Args) const {
@@ -274,7 +271,7 @@ void Driver::PrintActions(const ArgList &Args,
PrintActions1(Args, *it, Ids);
}
-void Driver::BuildUniversalActions(ArgList &Args, ActionList &Actions) {
+void Driver::BuildUniversalActions(ArgList &Args, ActionList &Actions) const {
// Collect the list of architectures. Duplicates are allowed, but
// should only be handled once (in the order seen).
llvm::StringSet<> ArchNames;
@@ -348,7 +345,7 @@ void Driver::BuildUniversalActions(ArgList &Args, ActionList &Actions) {
}
}
-void Driver::BuildActions(ArgList &Args, ActionList &Actions) {
+void Driver::BuildActions(ArgList &Args, ActionList &Actions) const {
// Start by constructing the list of inputs and their types.
// Track the current user specified (-x) input. We also explicitly
@@ -566,6 +563,12 @@ Action *Driver::ConstructPhaseAction(const ArgList &Args, phases::ID Phase,
return 0;
}
+Compilation *Driver::BuildJobs(const ArgList &Args,
+ const ActionList &Actions) const {
+ assert(0 && "FIXME: Implement");
+ return 0;
+}
+
llvm::sys::Path Driver::GetFilePath(const char *Name) const {
// FIXME: Implement.
return llvm::sys::Path(Name);