aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompileOptions.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-02 06:16:29 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-02 06:16:29 +0000
commite1bd4e6d7c5b13462f83245865f7d9e9b6ea8486 (patch)
treef5d7310f314fad1f73e3051ca6ef0e13726f45c5 /include/clang/Frontend/CompileOptions.h
parentec1abb9bd70f67a0a93bb5c9ffeafc184cb551d0 (diff)
Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65811 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompileOptions.h')
-rw-r--r--include/clang/Frontend/CompileOptions.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/clang/Frontend/CompileOptions.h b/include/clang/Frontend/CompileOptions.h
new file mode 100644
index 0000000000..2ccd356ff4
--- /dev/null
+++ b/include/clang/Frontend/CompileOptions.h
@@ -0,0 +1,54 @@
+//===--- CompileOptions.h ---------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the CompileOptions interface.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_COMPILEOPTIONS_H
+#define LLVM_CLANG_COMPILEOPTIONS_H
+
+namespace clang {
+
+/// CompileOptions - Track various options which control how the code
+/// is optimized and passed to the backend.
+struct CompileOptions {
+ unsigned OptimizationLevel : 3; /// The -O[0-4] option specified.
+ unsigned OptimizeSize : 1; /// If -Os is specified.
+ unsigned UnitAtATime : 1; /// Unused. For mirroring GCC
+ /// optimization selection.
+ unsigned InlineFunctions : 1; /// Should functions be inlined?
+ unsigned SimplifyLibCalls : 1; /// Should standard library calls be
+ /// treated specially.
+ unsigned UnrollLoops : 1; /// Control whether loops are unrolled.
+ unsigned VerifyModule : 1; /// Control whether the module
+ /// should be run through the LLVM Verifier.
+ unsigned TimePasses : 1; /// Set when -ftime-report is enabled.
+
+ /// CPU - An optional CPU to target.
+ std::string CPU;
+
+ /// Features - A list of subtarget features to pass to the code
+ /// generator.
+ std::vector<std::string> Features;
+
+public:
+ CompileOptions() {
+ OptimizationLevel = 0;
+ OptimizeSize = 0;
+ UnitAtATime = 1;
+ InlineFunctions = SimplifyLibCalls = UnrollLoops = 0;
+ VerifyModule = 1;
+ TimePasses = 0;
+ }
+};
+
+} // end namespace clang
+
+#endif