aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompileOptions.h
diff options
context:
space:
mode:
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 1af5e48ea119..34815c8cb54f 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;
}
};