aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompileOptions.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-02 22:07:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-02 22:07:45 +0000
commit877db3852e29c5b5a2dc25b3fe4a3b78619aa904 (patch)
tree90f465c800ad4cfd9eb16e1ed406258b2dc10ada /include/clang/Frontend/CompileOptions.h
parent86f4385536a0b2202860ad4e20d84f9330b1a4f4 (diff)
Add clang-cc support for -disable-llvm-optzns.
- Avoids running any LLVM optimizations, even at -O2, etc., while still keeping any language changes these optimizations imply. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72742 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompileOptions.h')
-rw-r--r--include/clang/Frontend/CompileOptions.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/clang/Frontend/CompileOptions.h b/include/clang/Frontend/CompileOptions.h
index 1af5e48ea1..34815c8cb5 100644
--- a/include/clang/Frontend/CompileOptions.h
+++ b/include/clang/Frontend/CompileOptions.h
@@ -23,12 +23,17 @@ namespace clang {
/// is optimized and passed to the backend.
class CompileOptions {
public:
+ enum InliningMethod {
+ NoInlining, // Perform no inlining whatsoever.
+ NormalInlining, // Use the standard function inlining pass.
+ OnlyAlwaysInlining // Only run the always inlining pass.
+ };
+
unsigned OptimizationLevel : 3; /// The -O[0-4] option specified.
unsigned OptimizeSize : 1; /// If -Os is specified.
unsigned DebugInfo : 1; /// Should generate deubg info (-g).
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.
@@ -37,6 +42,9 @@ public:
unsigned TimePasses : 1; /// Set when -ftime-report is enabled.
unsigned NoCommon : 1; /// Set when -fno-common or C++ is enabled.
+ /// Inlining - The kind of inlining to perform.
+ InliningMethod Inlining;
+
/// CPU - An optional CPU to target.
std::string CPU;
@@ -50,10 +58,11 @@ public:
OptimizeSize = 0;
DebugInfo = 0;
UnitAtATime = 1;
- InlineFunctions = SimplifyLibCalls = UnrollLoops = 0;
+ SimplifyLibCalls = UnrollLoops = 0;
VerifyModule = 1;
TimePasses = 0;
NoCommon = 0;
+ Inlining = NoInlining;
}
};