File tree Expand file tree Collapse file tree 5 files changed +3
-33
lines changed Expand file tree Collapse file tree 5 files changed +3
-33
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,6 @@ It can be used like this:
68
68
``__has_builtin `` should not be used to detect support for a builtin macro;
69
69
use ``#ifdef `` instead.
70
70
71
- When compiling with target offloading, ``__has_builtin `` only considers the
72
- currently active target.
73
-
74
71
``__has_constexpr_builtin ``
75
72
---------------------------
76
73
Original file line number Diff line number Diff line change @@ -37,8 +37,6 @@ Potentially Breaking Changes
37
37
C/C++ Language Potentially Breaking Changes
38
38
-------------------------------------------
39
39
40
- - The ``__has_builtin `` function now only considers the currently active target when being used with target offloading.
41
-
42
40
C++ Specific Potentially Breaking Changes
43
41
-----------------------------------------
44
42
- For C++20 modules, the Reduced BMI mode will be the default option. This may introduce
Original file line number Diff line number Diff line change @@ -1760,8 +1760,7 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) {
1760
1760
Tok, *this , diag::err_feature_check_malformed);
1761
1761
if (!II)
1762
1762
return false ;
1763
- unsigned BuiltinID = II->getBuiltinID ();
1764
- if (BuiltinID != 0 ) {
1763
+ else if (II->getBuiltinID () != 0 ) {
1765
1764
switch (II->getBuiltinID ()) {
1766
1765
case Builtin::BI__builtin_cpu_is:
1767
1766
return getTargetInfo ().supportsCpuIs ();
@@ -1775,11 +1774,8 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) {
1775
1774
// usual allocation and deallocation functions. Required by libc++
1776
1775
return 201802 ;
1777
1776
default :
1778
- // __has_builtin should return false for aux builtins.
1779
- if (getBuiltinInfo ().isAuxBuiltinID (BuiltinID))
1780
- return false ;
1781
1777
return Builtin::evaluateRequiredTargetFeatures (
1782
- getBuiltinInfo ().getRequiredFeatures (BuiltinID ),
1778
+ getBuiltinInfo ().getRequiredFeatures (II-> getBuiltinID () ),
1783
1779
getTargetInfo ().getTargetOpts ().FeatureMap );
1784
1780
}
1785
1781
return true ;
Original file line number Diff line number Diff line change 3
3
// RUN: %clang_cc1 %s -ffreestanding -fms-extensions -fms-compatibility \
4
4
// RUN: -fms-compatibility-version=19.00 -triple x86_64-pc-windows-msvc -emit-llvm -o -
5
5
// %clang_cc1 %s -ffreestanding -triple x86_64-w64-windows-gnu -fms-extensions -emit-llvm -o -
6
- //
7
- // FIXME: See https://github.com/llvm/llvm-project/pull/121839 and
8
- // FIXME: https://github.com/llvm/llvm-project/pull/126324
9
- // RUN: not %clang_cc1 %s -ffreestanding -fopenmp -fopenmp-is-target-device -aux-triple x86_64-unknown-linux-gnu
6
+ // RUN: %clang_cc1 %s -ffreestanding -fopenmp -fopenmp-is-target-device -aux-triple x86_64-unknown-linux-gnu
10
7
11
8
typedef __SIZE_TYPE__ size_t ;
12
9
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments