From: Joerg Sonnenberger Date: Fri, 6 Jan 2012 18:32:26 +0000 (+0000) Subject: __FLT_EVAL_METHOD__ should be 1 on NetBSD/i386, since it defaults to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42378be9a055050c86e3e5cf9c456b40342de950;p=clang __FLT_EVAL_METHOD__ should be 1 on NetBSD/i386, since it defaults to "double" rounding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147669 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index dd85c64496..51538f1a77 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -2184,6 +2184,20 @@ public: }; } // end anonymous namespace +namespace { +class NetBSDI386TargetInfo : public NetBSDTargetInfo { +public: + NetBSDI386TargetInfo(const std::string &triple) : + NetBSDTargetInfo(triple) { + } + + virtual unsigned getFloatEvalMethod() const { + // NetBSD defaults to "double" rounding + return 1; + } +}; +} // end anonymous namespace + namespace { class OpenBSDI386TargetInfo : public OpenBSDTargetInfo { public: @@ -3889,7 +3903,7 @@ static TargetInfo *AllocateTarget(const std::string &T) { case llvm::Triple::DragonFly: return new DragonFlyBSDTargetInfo(T); case llvm::Triple::NetBSD: - return new NetBSDTargetInfo(T); + return new NetBSDI386TargetInfo(T); case llvm::Triple::OpenBSD: return new OpenBSDI386TargetInfo(T); case llvm::Triple::FreeBSD: