aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CodeGenOptions.h
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-06-28 08:01:44 +0000
committerHans Wennborg <hans@hanshq.net>2012-06-28 08:01:44 +0000
commitde981f3ff163bc9ec69e4c5e7316e94276412993 (patch)
tree5b965d25849d6216a431f45337cd6601efa2e632 /include/clang/Frontend/CodeGenOptions.h
parentb6ebd4490235c9ea6016530d623c46d0b9ce565b (diff)
Add -ftls-model command-line flag.
This allows for setting the default TLS model. (PR9788) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CodeGenOptions.h')
-rw-r--r--include/clang/Frontend/CodeGenOptions.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h
index c3ac10c982..b36f5f2751 100644
--- a/include/clang/Frontend/CodeGenOptions.h
+++ b/include/clang/Frontend/CodeGenOptions.h
@@ -44,6 +44,13 @@ public:
FullDebugInfo // Generate complete debug info.
};
+ enum TLSModel {
+ GeneralDynamicTLSModel,
+ LocalDynamicTLSModel,
+ InitialExecTLSModel,
+ LocalExecTLSModel
+ };
+
unsigned AsmVerbose : 1; ///< -dA, -fverbose-asm.
unsigned ObjCAutoRefCountExceptions : 1; ///< Whether ARC should be EH-safe.
unsigned CUDAIsDevice : 1; ///< Set when compiling for CUDA device.
@@ -175,6 +182,9 @@ public:
/// The run-time penalty for bounds checking, or 0 to disable.
unsigned char BoundsChecking;
+ /// The default TLS model to use.
+ TLSModel DefaultTLSModel;
+
public:
CodeGenOptions() {
AsmVerbose = 0;
@@ -231,6 +241,7 @@ public:
DebugInfo = NoDebugInfo;
Inlining = NoInlining;
RelocationModel = "pic";
+ DefaultTLSModel = GeneralDynamicTLSModel;
}
ObjCDispatchMethodKind getObjCDispatchMethod() const {