[cfe-commits] r66968 - in /cfe/trunk: include/clang/Driver/Driver.h lib/Driver/Driver.cpp
Daniel Dunbar
daniel at zuster.org
Fri Mar 13 15:12:33 PDT 2009
Author: ddunbar
Date: Fri Mar 13 17:12:33 2009
New Revision: 66968
URL: http://llvm.org/viewvc/llvm-project?rev=66968&view=rev
Log:
Driver: Sprinkle some consts in, stub out BuildJobs method.
Modified:
cfe/trunk/include/clang/Driver/Driver.h
cfe/trunk/lib/Driver/Driver.cpp
Modified: cfe/trunk/include/clang/Driver/Driver.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Driver.h?rev=66968&r1=66967&r2=66968&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Driver.h (original)
+++ cfe/trunk/include/clang/Driver/Driver.h Fri Mar 13 17:12:33 2009
@@ -37,12 +37,8 @@
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 @@
/// @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
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=66968&r1=66967&r2=66968&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Mar 13 17:12:33 2009
@@ -171,10 +171,7 @@
return 0;
}
-
- assert(0 && "FIXME: Implement");
-
- return new Compilation();
+ return BuildJobs(*Args, Actions);
}
void Driver::PrintOptions(const ArgList &Args) const {
@@ -274,7 +271,7 @@
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::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 @@
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);
More information about the cfe-commits
mailing list