aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Driver/Compilation.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-25 04:13:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-25 04:13:45 +0000
commitf3cad36e59a41b5767fe662b5ac8911ee174b801 (patch)
tree63dc6f58c11d1e55925b68a3bf76eeb5c047e70d /include/clang/Driver/Compilation.h
parent515455ac32e2accac51c33ceaa7e2dd7c36ef3f2 (diff)
Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList. - This is not a great decomposition, but it does embed the translation into the type system, and keep things efficient for tool chains that don't want to do any translation. - No intended functionality change. Eventually I hope to get rid of tool chain specific translation and have each tool do the right thing, but for now this is the easiest way to match gcc precisely (which is good for testing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Driver/Compilation.h')
-rw-r--r--include/clang/Driver/Compilation.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/clang/Driver/Compilation.h b/include/clang/Driver/Compilation.h
index 1a6d7b02ea..4985f30ad5 100644
--- a/include/clang/Driver/Compilation.h
+++ b/include/clang/Driver/Compilation.h
@@ -22,8 +22,9 @@ namespace llvm {
namespace clang {
namespace driver {
- class ArgList;
+ class DerivedArgList;
class Driver;
+ class InputArgList;
class JobList;
class ToolChain;
@@ -37,7 +38,7 @@ class Compilation {
ToolChain &DefaultToolChain;
/// The original (untranslated) input argument list.
- ArgList *Args;
+ InputArgList *Args;
/// The list of actions.
ActionList Actions;
@@ -46,7 +47,7 @@ class Compilation {
JobList Jobs;
/// Cache of translated arguments for a particular tool chain.
- llvm::DenseMap<const ToolChain*, ArgList*> TCArgs;
+ llvm::DenseMap<const ToolChain*, DerivedArgList*> TCArgs;
/// Temporary files which should be removed on exit.
ArgStringList TempFiles;
@@ -55,24 +56,24 @@ class Compilation {
ArgStringList ResultFiles;
public:
- Compilation(Driver &D, ToolChain &DefaultToolChain, ArgList *Args);
+ Compilation(Driver &D, ToolChain &DefaultToolChain, InputArgList *Args);
~Compilation();
const Driver &getDriver() const { return TheDriver; }
const ToolChain &getDefaultToolChain() const { return DefaultToolChain; }
- const ArgList &getArgs() const { return *Args; }
+ const InputArgList &getArgs() const { return *Args; }
ActionList &getActions() { return Actions; }
const ActionList &getActions() const { return Actions; }
JobList &getJobs() { return Jobs; }
- /// getArgsForToolChain - Return the argument list, possibly
- /// translated by the tool chain \arg TC (or by the default tool
- /// chain, if TC is not specified).
- const ArgList &getArgsForToolChain(const ToolChain *TC = 0);
+ /// getArgsForToolChain - Return the derived argument list for the
+ /// tool chain \arg TC (or the default tool chain, if TC is not
+ /// specified).
+ const DerivedArgList &getArgsForToolChain(const ToolChain *TC = 0);
/// addTempFile - Add a file to remove on exit, and returns its
/// argument.