aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-08-12 22:08:57 +0000
committerChad Rosier <mcrosier@apple.com>2011-08-12 22:08:57 +0000
commitbe69f6092668b0586c8729855c01ca2eea22e6fe (patch)
tree56e59e3d5d5d8fe8d0a8d6572398e20bcf28fbc0 /include/clang
parent703ffb11eff7bc6e8532bdbe54045e19a7732253 (diff)
[driver] Refactor a bit to enable a few fixes when generating diagnostics. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Driver/Driver.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h
index 8a1e1cbbc0..e979146724 100644
--- a/include/clang/Driver/Driver.h
+++ b/include/clang/Driver/Driver.h
@@ -13,6 +13,7 @@
#include "clang/Basic/Diagnostic.h"
#include "clang/Driver/Phases.h"
+#include "clang/Driver/Types.h"
#include "clang/Driver/Util.h"
#include "llvm/ADT/StringRef.h"
@@ -110,6 +111,9 @@ public:
/// The file to log CC_LOG_DIAGNOSTICS output to, if enabled.
const char *CCLogDiagnosticsFilename;
+ /// A list of inputs and their types for the given arguments.
+ typedef SmallVector<std::pair<types::ID, const Arg*>, 16> InputList;
+
/// Whether the driver should follow g++ like behavior.
unsigned CCCIsCXX : 1;
@@ -242,6 +246,16 @@ public:
/// ArgList.
InputArgList *ParseArgStrings(ArrayRef<const char *> Args);
+ /// BuildInputs - Construct the list of inputs and their types from
+ /// the given arguments.
+ ///
+ /// \param TC - The default host tool chain.
+ /// \param Args - The input arguments.
+ /// \param Inputs - The list to store the resulting compilation
+ /// inputs onto.
+ void BuildInputs(const ToolChain &TC, const DerivedArgList &Args,
+ InputList &Inputs) const;
+
/// BuildActions - Construct the list of actions to perform for the
/// given arguments, which are only done for a single architecture.
///
@@ -249,7 +263,7 @@ public:
/// \param Args - The input arguments.
/// \param Actions - The list to store the resulting actions onto.
void BuildActions(const ToolChain &TC, const DerivedArgList &Args,
- ActionList &Actions) const;
+ const InputList &Inputs, ActionList &Actions) const;
/// BuildUniversalActions - Construct the list of actions to perform
/// for the given arguments, which may require a universal build.
@@ -258,6 +272,7 @@ public:
/// \param Args - The input arguments.
/// \param Actions - The list to store the resulting actions onto.
void BuildUniversalActions(const ToolChain &TC, const DerivedArgList &Args,
+ const InputList &BAInputs,
ActionList &Actions) const;
/// BuildJobs - Bind actions to concrete tools and translate