@@ -830,17 +830,20 @@ void registerPredefinedTargetVersions() {
830
830
if (triple.getEnvironment () == llvm::Triple::Android) {
831
831
VersionCondition::addPredefinedGlobalIdent (" Android" );
832
832
VersionCondition::addPredefinedGlobalIdent (" CRuntime_Bionic" );
833
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" );
833
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_LLVM" );
834
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" ); // legacy
834
835
} else if (triple.isMusl ()) {
835
836
VersionCondition::addPredefinedGlobalIdent (" CRuntime_Musl" );
836
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Gcc" );
837
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_GNU" );
838
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Gcc" ); // legacy
837
839
// use libunwind for backtraces
838
840
VersionCondition::addPredefinedGlobalIdent (" DRuntime_Use_Libunwind" );
839
841
} else if (global.params .isUClibcEnvironment ) {
840
842
VersionCondition::addPredefinedGlobalIdent (" CRuntime_UClibc" );
841
843
} else {
842
844
VersionCondition::addPredefinedGlobalIdent (" CRuntime_Glibc" );
843
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Gcc" );
845
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_GNU" );
846
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Gcc" ); // legacy
844
847
}
845
848
break ;
846
849
case llvm::Triple::Haiku:
@@ -853,7 +856,8 @@ void registerPredefinedTargetVersions() {
853
856
VersionCondition::addPredefinedGlobalIdent (
854
857
" darwin" ); // For backwards compatibility.
855
858
VersionCondition::addPredefinedGlobalIdent (" Posix" );
856
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" );
859
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_LLVM" );
860
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" ); // legacy
857
861
break ;
858
862
case llvm::Triple::FreeBSD:
859
863
VersionCondition::addPredefinedGlobalIdent (" FreeBSD" );
@@ -864,7 +868,8 @@ void registerPredefinedTargetVersions() {
864
868
warning (Loc (), " FreeBSD major version not specified in target triple" );
865
869
}
866
870
VersionCondition::addPredefinedGlobalIdent (" Posix" );
867
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" );
871
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_LLVM" );
872
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" ); // legacy
868
873
break ;
869
874
case llvm::Triple::Solaris:
870
875
VersionCondition::addPredefinedGlobalIdent (" Solaris" );
@@ -874,7 +879,8 @@ void registerPredefinedTargetVersions() {
874
879
case llvm::Triple::DragonFly:
875
880
VersionCondition::addPredefinedGlobalIdent (" DragonFlyBSD" );
876
881
VersionCondition::addPredefinedGlobalIdent (" Posix" );
877
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Gcc" );
882
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_GNU" );
883
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Gcc" ); // legacy
878
884
break ;
879
885
case llvm::Triple::NetBSD:
880
886
VersionCondition::addPredefinedGlobalIdent (" NetBSD" );
@@ -883,7 +889,8 @@ void registerPredefinedTargetVersions() {
883
889
case llvm::Triple::OpenBSD:
884
890
VersionCondition::addPredefinedGlobalIdent (" OpenBSD" );
885
891
VersionCondition::addPredefinedGlobalIdent (" Posix" );
886
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Gcc" );
892
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_GNU" );
893
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Gcc" ); // legacy
887
894
break ;
888
895
case llvm::Triple::AIX:
889
896
VersionCondition::addPredefinedGlobalIdent (" AIX" );
@@ -892,17 +899,20 @@ void registerPredefinedTargetVersions() {
892
899
case llvm::Triple::IOS:
893
900
VersionCondition::addPredefinedGlobalIdent (" iOS" );
894
901
VersionCondition::addPredefinedGlobalIdent (" Posix" );
895
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" );
902
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_LLVM" );
903
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" ); // legacy
896
904
break ;
897
905
case llvm::Triple::TvOS:
898
906
VersionCondition::addPredefinedGlobalIdent (" TVOS" );
899
907
VersionCondition::addPredefinedGlobalIdent (" Posix" );
900
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" );
908
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_LLVM" );
909
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" ); // legacy
901
910
break ;
902
911
case llvm::Triple::WatchOS:
903
912
VersionCondition::addPredefinedGlobalIdent (" WatchOS" );
904
913
VersionCondition::addPredefinedGlobalIdent (" Posix" );
905
- VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" );
914
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_LLVM" );
915
+ VersionCondition::addPredefinedGlobalIdent (" CppRuntime_Clang" ); // legacy
906
916
break ;
907
917
case llvm::Triple::WASI:
908
918
VersionCondition::addPredefinedGlobalIdent (" WASI" );
0 commit comments