diff options
author | Marcin Koscielnicki <koriakin@0x04.net> | 2016-06-16 13:41:54 +0000 |
---|---|---|
committer | Marcin Koscielnicki <koriakin@0x04.net> | 2016-06-16 13:41:54 +0000 |
commit | a46fade624be60738af2f144c47d620e2db2953f (patch) | |
tree | 939b8bcfc47d41c0f81a01443aadde4852ac4c93 /clang/lib/CodeGen/CGBuiltin.cpp | |
parent | cf1d4987b989fd15d3506505917bc9c11379247e (diff) | |
download | bcm5719-llvm-a46fade624be60738af2f144c47d620e2db2953f.tar.gz bcm5719-llvm-a46fade624be60738af2f144c47d620e2db2953f.zip |
[Builtin] Make __builtin_thread_pointer target-independent.
This is now supported for ARM, AArch64, PowerPC, SystemZ, SPARC, Mips.
Differential Revision: http://reviews.llvm.org/D19589
llvm-svn: 272893
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index b6938d4cab4..8b8996bde95 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -2158,6 +2158,13 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, case Builtin::BI__builtin_canonicalizef: case Builtin::BI__builtin_canonicalizel: return RValue::get(emitUnaryBuiltin(*this, E, Intrinsic::canonicalize)); + + case Builtin::BI__builtin_thread_pointer: { + if (!getContext().getTargetInfo().isTLSSupported()) + CGM.ErrorUnsupported(E, "__builtin_thread_pointer"); + // Fall through - it's already mapped to the intrinsic by GCCBuiltin. + break; + } } // If this is an alias for a lib function (e.g. __builtin_sin), emit |