We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84a88ca commit dac5ab0Copy full SHA for dac5ab0
driver/main.cpp
@@ -779,6 +779,12 @@ void registerPredefinedTargetVersions() {
779
break;
780
case llvm::Triple::FreeBSD:
781
VersionCondition::addPredefinedGlobalIdent("FreeBSD");
782
+ if (unsigned major = triple.getOSMajorVersion()) {
783
+ const auto withMajor = "FreeBSD_" + std::to_string(major);
784
+ VersionCondition::addPredefinedGlobalIdent(withMajor.c_str());
785
+ } else {
786
+ warning(Loc(), "FreeBSD major version not specified in target triple");
787
+ }
788
VersionCondition::addPredefinedGlobalIdent("Posix");
789
VersionCondition::addPredefinedGlobalIdent("CppRuntime_Clang");
790
0 commit comments