aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r--include/clang/Frontend/ASTConsumers.h20
-rw-r--r--include/clang/Frontend/CodeGenAction.h50
-rw-r--r--include/clang/Frontend/FrontendActions.h40
3 files changed, 50 insertions, 60 deletions
diff --git a/include/clang/Frontend/ASTConsumers.h b/include/clang/Frontend/ASTConsumers.h
index 7ec5063b53..b5b09f536d 100644
--- a/include/clang/Frontend/ASTConsumers.h
+++ b/include/clang/Frontend/ASTConsumers.h
@@ -69,26 +69,6 @@ ASTConsumer *CreateObjCRewriter(const std::string &InFile,
const LangOptions &LOpts,
bool SilenceRewriteMacroWarning);
-// LLVM code generator: uses the code generation backend to generate LLVM
-// assembly. This runs optimizations depending on the CodeGenOptions
-// parameter. The output depends on the Action parameter.
-enum BackendAction {
- Backend_EmitAssembly, // Emit native assembly files
- Backend_EmitBC, // Emit LLVM bitcode files
- Backend_EmitLL, // Emit human-readable LLVM assembly
- Backend_EmitNothing, // Don't emit anything (benchmarking mode)
- Backend_EmitObj // Emit native object files
-};
-ASTConsumer *CreateBackendConsumer(BackendAction Action,
- Diagnostic &Diags,
- const LangOptions &Features,
- const CodeGenOptions &CodeGenOpts,
- const TargetOptions &TargetOpts,
- bool TimePasses,
- const std::string &ModuleID,
- llvm::raw_ostream *OS,
- llvm::LLVMContext& C);
-
/// CreateHTMLPrinter - Create an AST consumer which rewrites source code to
/// HTML with syntax highlighting suitable for viewing in a web-browser.
ASTConsumer *CreateHTMLPrinter(llvm::raw_ostream *OS, Preprocessor &PP,
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();
+};
+
+}
diff --git a/include/clang/Frontend/FrontendActions.h b/include/clang/Frontend/FrontendActions.h
index cbb3508c8a..5348e6b1ee 100644
--- a/include/clang/Frontend/FrontendActions.h
+++ b/include/clang/Frontend/FrontendActions.h
@@ -159,46 +159,6 @@ public:
};
//===----------------------------------------------------------------------===//
-// Code Gen AST Actions
-//===----------------------------------------------------------------------===//
-
-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();
-};
-
-//===----------------------------------------------------------------------===//
// Preprocessor Actions
//===----------------------------------------------------------------------===//