aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2009-11-12 17:24:48 +0000
committerChandler Carruth <chandlerc@gmail.com>2009-11-12 17:24:48 +0000
commit2811ccf48d6d898c42cc4cfad37abedb36236d20 (patch)
tree283a52cb33efc6e98cb15cacf2ecc63f3707cae7 /include
parent95c5d8ac29ba3423e735a0732713907e484b800d (diff)
Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
This resolves the layering violation where CodeGen depended on Frontend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/CodeGen/CodeGenOptions.h (renamed from include/clang/Frontend/CompileOptions.h)14
-rw-r--r--include/clang/CodeGen/ModuleBuilder.h4
-rw-r--r--include/clang/Frontend/ASTConsumers.h6
-rw-r--r--include/clang/Frontend/CompilerInvocation.h10
4 files changed, 17 insertions, 17 deletions
diff --git a/include/clang/Frontend/CompileOptions.h b/include/clang/CodeGen/CodeGenOptions.h
index 2e8cfddf18..c076ec095f 100644
--- a/include/clang/Frontend/CompileOptions.h
+++ b/include/clang/CodeGen/CodeGenOptions.h
@@ -1,4 +1,4 @@
-//===--- CompileOptions.h ---------------------------------------*- C++ -*-===//
+//===--- CodeGenOptions.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,21 +7,21 @@
//
//===----------------------------------------------------------------------===//
//
-// This file defines the CompileOptions interface.
+// This file defines the CodeGenOptions interface.
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_FRONTEND_COMPILEOPTIONS_H
-#define LLVM_CLANG_FRONTEND_COMPILEOPTIONS_H
+#ifndef LLVM_CLANG_CODEGEN_CODEGENOPTIONS_H
+#define LLVM_CLANG_CODEGEN_CODEGENOPTIONS_H
#include <string>
#include <vector>
namespace clang {
-/// CompileOptions - Track various options which control how the code
+/// CodeGenOptions - Track various options which control how the code
/// is optimized and passed to the backend.
-class CompileOptions {
+class CodeGenOptions {
public:
enum InliningMethod {
NoInlining, // Perform no inlining whatsoever.
@@ -60,7 +60,7 @@ public:
std::vector<std::string> Features;
public:
- CompileOptions() {
+ CodeGenOptions() {
OptimizationLevel = 0;
OptimizeSize = 0;
DebugInfo = 0;
diff --git a/include/clang/CodeGen/ModuleBuilder.h b/include/clang/CodeGen/ModuleBuilder.h
index 1871c8f206..2a3aa6a904 100644
--- a/include/clang/CodeGen/ModuleBuilder.h
+++ b/include/clang/CodeGen/ModuleBuilder.h
@@ -25,7 +25,7 @@ namespace llvm {
namespace clang {
class Diagnostic;
class LangOptions;
- class CompileOptions;
+ class CodeGenOptions;
class CodeGenerator : public ASTConsumer {
public:
@@ -35,7 +35,7 @@ namespace clang {
CodeGenerator *CreateLLVMCodeGen(Diagnostic &Diags,
const std::string &ModuleName,
- const CompileOptions &CO,
+ const CodeGenOptions &CGO,
llvm::LLVMContext& C);
}
diff --git a/include/clang/Frontend/ASTConsumers.h b/include/clang/Frontend/ASTConsumers.h
index 742813c669..cd35638f2c 100644
--- a/include/clang/Frontend/ASTConsumers.h
+++ b/include/clang/Frontend/ASTConsumers.h
@@ -28,7 +28,7 @@ class ASTConsumer;
class Diagnostic;
class FileManager;
class Preprocessor;
-class CompileOptions;
+class CodeGenOptions;
class LangOptions;
// AST pretty-printer: prints out the AST in a format that is close to the
@@ -69,7 +69,7 @@ ASTConsumer *CreateObjCRewriter(const std::string &InFile,
bool SilenceRewriteMacroWarning);
// LLVM code generator: uses the code generation backend to generate LLVM
-// assembly. This runs optimizations depending on the CompileOptions
+// assembly. This runs optimizations depending on the CodeGenOptions
// parameter. The output depends on the Action parameter.
enum BackendAction {
Backend_EmitAssembly, // Emit native assembly
@@ -80,7 +80,7 @@ enum BackendAction {
ASTConsumer *CreateBackendConsumer(BackendAction Action,
Diagnostic &Diags,
const LangOptions &Features,
- const CompileOptions &CompileOpts,
+ const CodeGenOptions &CodeGenOpts,
const std::string &ModuleID,
llvm::raw_ostream *OS,
llvm::LLVMContext& C);
diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h
index 6e231d359f..8a8b0fb000 100644
--- a/include/clang/Frontend/CompilerInvocation.h
+++ b/include/clang/Frontend/CompilerInvocation.h
@@ -11,8 +11,8 @@
#define LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
#include "clang/Basic/LangOptions.h"
+#include "clang/CodeGen/CodeGenOptions.h"
#include "clang/Frontend/AnalysisConsumer.h"
-#include "clang/Frontend/CompileOptions.h"
#include "clang/Frontend/DependencyOutputOptions.h"
#include "clang/Frontend/DiagnosticOptions.h"
#include "clang/Frontend/HeaderSearchOptions.h"
@@ -34,7 +34,7 @@ class CompilerInvocation {
AnalyzerOptions AnalyzerOpts;
/// Options controlling IRgen and the backend.
- CompileOptions CompileOpts;
+ CodeGenOptions CodeGenOpts;
/// Options controlling dependency output.
DependencyOutputOptions DependencyOutputOpts;
@@ -76,9 +76,9 @@ public:
return AnalyzerOpts;
}
- CompileOptions &getCompileOpts() { return CompileOpts; }
- const CompileOptions &getCompileOpts() const {
- return CompileOpts;
+ CodeGenOptions &getCodeGenOpts() { return CodeGenOpts; }
+ const CodeGenOptions &getCodeGenOpts() const {
+ return CodeGenOpts;
}
DependencyOutputOptions &getDependencyOutputOpts() {