[PATCH] D57625: [TargetLibraryInfo] Update run time support for Windows

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 14:57:30 PST 2019


rnk added a comment.

In D57625#1386095 <https://reviews.llvm.org/D57625#1386095>, @mstorsjo wrote:

> They're certainly available since UCRT, but msvcr120.dll (MSVC 2013, aka 18.00) also seems to have at least rint, round, cbrt, exp2. (I'm checking https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/lib64/msvcr120.def.in.)


I don't think we need to go the extra mile to provide rint to users targeting 2013. We can reduce it to just pre-2015 and post, as is done in this patch.



================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:165
+                         T.getArch() == Triple::arm ||
+                         T.getArch() == Triple::x86_64);
+
----------------
I think you can use `T.getEnvironmentVersion()` here to get the MSVC version. Maybe make it conditional on `isWindowsMSVCEnvironment()`. If there is no version or it isn't an MSVC environment, just assume full C99 support is available (i.e. the UCRT is in use).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57625/new/

https://reviews.llvm.org/D57625





More information about the llvm-commits mailing list