aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-13 11:30:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-13 11:30:17 +0000
commit7ab25d5c03db34ca5cbca466a4caa224c4879ec6 (patch)
tree4d3b98c7dc177a6466ffb47d253552620e84fd17
parentc1b5fa81a2dfa4fea2e25bf057363658e7b43681 (diff)
Driver: Add remaining Action classes we need.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66882 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Driver/Action.h56
1 files changed, 52 insertions, 4 deletions
diff --git a/include/clang/Driver/Action.h b/include/clang/Driver/Action.h
index 1eb754be16..d0c29aa908 100644
--- a/include/clang/Driver/Action.h
+++ b/include/clang/Driver/Action.h
@@ -17,6 +17,7 @@
namespace clang {
namespace driver {
+ class Arg;
/// Action - Represent an abstract compilation step to perform.
///
@@ -34,6 +35,9 @@ class Action {
ActionList Inputs;
protected:
+ Action(types::ID _Type) : Type(_Type) {}
+ Action(Action *Input, types::ID _Type) : Type(_Type),
+ Inputs(&Input, &Input + 1) {}
Action(const ActionList &_Inputs, types::ID _Type) : Type(_Type),
Inputs(_Inputs) {}
public:
@@ -43,6 +47,10 @@ public:
};
class InputAction : public Action {
+ const Arg &Input;
+public:
+ InputAction(const Arg &_Input, types::ID _Type) : Action(_Type),
+ Input(_Input) {}
};
class BindArchAction : public Action {
@@ -50,15 +58,55 @@ class BindArchAction : public Action {
public:
BindArchAction(Action *Input, const char *_ArchName)
- : Action(ActionList(&Input, &Input + 1), Input->getType()),
- ArchName(_ArchName) {
+ : Action(Input, Input->getType()), ArchName(_ArchName) {
}
};
class JobAction : public Action {
protected:
- JobAction(ActionList &Inputs, types::ID Type)
- : Action(Inputs, Type) {}
+ JobAction(Action *Input, types::ID Type) : Action(Input, Type) {}
+ JobAction(const ActionList &Inputs, types::ID Type) : Action(Inputs, Type) {}
+};
+
+class PreprocessJobAction : public JobAction {
+public:
+ PreprocessJobAction(Action *Input, types::ID OutputType)
+ : JobAction(Input, OutputType) {
+ }
+};
+
+class PrecompileJobAction : public JobAction {
+public:
+ PrecompileJobAction(Action *Input, types::ID OutputType)
+ : JobAction(Input, OutputType) {
+ }
+};
+
+class AnalyzeJobAction : public JobAction {
+public:
+ AnalyzeJobAction(Action *Input, types::ID OutputType)
+ : JobAction(Input, OutputType) {
+ }
+};
+
+class CompileJobAction : public JobAction {
+public:
+ CompileJobAction(Action *Input, types::ID OutputType)
+ : JobAction(Input, OutputType) {
+ }
+};
+
+class AssembleJobAction : public JobAction {
+public:
+ AssembleJobAction(Action *Input, types::ID OutputType)
+ : JobAction(Input, OutputType) {
+ }
+};
+
+class LinkJobAction : public JobAction {
+public:
+ LinkJobAction(ActionList &Inputs, types::ID Type)
+ : JobAction(Inputs, Type) {}
};
class LipoJobAction : public JobAction {