brooks created this revision. brooks added reviewers: arichardson, emaste, dim. Herald added a subscriber: krytarowski. Herald added a project: All. brooks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
This is a prerequisite for proper runtime support on FreeBSD as it will allow such a runtime to be compiled. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D135171 Files: clang/lib/Basic/Targets/OSTargets.h Index: clang/lib/Basic/Targets/OSTargets.h =================================================================== --- clang/lib/Basic/Targets/OSTargets.h +++ clang/lib/Basic/Targets/OSTargets.h @@ -232,15 +232,20 @@ // setting this to 1 is conforming even if all the basic source // character literals have the same encoding as char and wchar_t. Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1"); + + if (this->HasFloat128) + Builder.defineMacro("__FLOAT128__"); } public: FreeBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : OSTargetInfo<Target>(Triple, Opts) { switch (Triple.getArch()) { - default: case llvm::Triple::x86: case llvm::Triple::x86_64: + this->HasFloat128 = true; + [[fallthrough]]; + default: this->MCountName = ".mcount"; break; case llvm::Triple::mips:
Index: clang/lib/Basic/Targets/OSTargets.h =================================================================== --- clang/lib/Basic/Targets/OSTargets.h +++ clang/lib/Basic/Targets/OSTargets.h @@ -232,15 +232,20 @@ // setting this to 1 is conforming even if all the basic source // character literals have the same encoding as char and wchar_t. Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1"); + + if (this->HasFloat128) + Builder.defineMacro("__FLOAT128__"); } public: FreeBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : OSTargetInfo<Target>(Triple, Opts) { switch (Triple.getArch()) { - default: case llvm::Triple::x86: case llvm::Triple::x86_64: + this->HasFloat128 = true; + [[fallthrough]]; + default: this->MCountName = ".mcount"; break; case llvm::Triple::mips:
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits