aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CodeGenAction.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-25 04:37:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-25 04:37:45 +0000
commit4ee34616c6fa7700e27c0a5311718d844cbb7d2c (patch)
tree8ee68707f0a9a26b410050073a33bcc882b8bd9a /include/clang/Frontend/CodeGenAction.h
parent5d64f8a05ae080f029f0379ed834572065038e28 (diff)
Frontend: Pull CodeGenAction out more, and eliminate CreateBackendConsumer.
This is the way I would like to move the frontend function towards -- distinct pieces of functionality should be exposed only via FrontendAction implementations which have clean and relatively-stable APIs. This also isolates the surface area in clang which depends on LLVM CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CodeGenAction.h')
-rw-r--r--include/clang/Frontend/CodeGenAction.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/clang/Frontend/CodeGenAction.h b/include/clang/Frontend/CodeGenAction.h
new file mode 100644
index 0000000000..f782e1287a
--- /dev/null
+++ b/include/clang/Frontend/CodeGenAction.h
@@ -0,0 +1,50 @@
+//===--- CodeGenAction.h - LLVM Code Generation Frontend Action -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Frontend/FrontendAction.h"
+
+namespace clang {
+
+class CodeGenAction : public ASTFrontendAction {
+private:
+ unsigned Act;
+
+protected:
+ CodeGenAction(unsigned _Act);
+
+ virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
+ llvm::StringRef InFile);
+};
+
+class EmitAssemblyAction : public CodeGenAction {
+public:
+ EmitAssemblyAction();
+};
+
+class EmitBCAction : public CodeGenAction {
+public:
+ EmitBCAction();
+};
+
+class EmitLLVMAction : public CodeGenAction {
+public:
+ EmitLLVMAction();
+};
+
+class EmitLLVMOnlyAction : public CodeGenAction {
+public:
+ EmitLLVMOnlyAction();
+};
+
+class EmitObjAction : public CodeGenAction {
+public:
+ EmitObjAction();
+};
+
+}