diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-04-19 21:38:35 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-04-19 21:38:35 +0000 |
commit | b030f0272500c6c5602f587ac029ee0dc0e5a05c (patch) | |
tree | 558d1e4760d28ff1f8ed6c8d8995aab35f146e66 /lib/Basic/Targets.cpp | |
parent | f545be5552b6fd40a4c766fbf82dab0ab5305790 (diff) |
Add target property for whether thread-local storage is supported.
Let me know if I messed up for some target. Note that for Windows, we
should be able to support it (MSVC supports "__declspec(thread)"), but
I'm pretty sure LLVM doesn't know how to generate the correct code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69552 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index fa23ba9162..c392e58b48 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -718,6 +718,7 @@ public: DescriptionString = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-" "i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-" "a0:0:64-f80:128:128"; + TLSSupported = false; } virtual const char *getStringSymbolPrefix(bool IsConstant) const { @@ -801,6 +802,7 @@ class WindowsX86_32TargetInfo : public X86_32TargetInfo { public: WindowsX86_32TargetInfo(const std::string& triple) : X86_32TargetInfo(triple) { + TLSSupported = false; // FIXME: Fix wchar_t. // FIXME: We should probably enable -fms-extensions by default for // this target. @@ -879,8 +881,9 @@ namespace { // x86-64 Darwin (OS X) target class DarwinX86_64TargetInfo : public X86_64TargetInfo { public: - DarwinX86_64TargetInfo(const std::string& triple) : - X86_64TargetInfo(triple) {} + DarwinX86_64TargetInfo(const std::string& triple) : X86_64TargetInfo(triple) { + TLSSupported = false; + } virtual const char *getStringSymbolPrefix(bool IsConstant) const { return IsConstant ? "\01LC" : "\01lC"; @@ -1012,7 +1015,9 @@ public: namespace { class DarwinARMTargetInfo : public ARMTargetInfo { public: - DarwinARMTargetInfo(const std::string& triple) : ARMTargetInfo(triple) {} + DarwinARMTargetInfo(const std::string& triple) : ARMTargetInfo(triple) { + TLSSupported = false; + } virtual void getTargetDefines(const LangOptions &Opts, std::vector<char> &Defines) const { @@ -1155,6 +1160,7 @@ namespace { class PIC16TargetInfo : public TargetInfo{ public: PIC16TargetInfo(const std::string& triple) : TargetInfo(triple) { + TLSSupported = false; IntWidth = 16; LongWidth = LongLongWidth = 32; PointerWidth = 16; |