[PATCH] D77776: [Driver] Default to libc++ on FreeBSD
Alexander Richardson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 20 14:38:44 PDT 2020
arichardson added a comment.
I don't like the fact that this only changes one of the users of `getTriple().getOSMajorVersion()`. Could you add a new member function such as
void FreeBSD::getMajorVersion() const {
unsigned Major = getTriple().getOSMajorVersion();
if (Major == 0)
return 10;
return Major
}
and replace all uses of `getTriple().getOSMajorVersion()` with `getMajorVersion()`.
We could also use the host version instead of 10?
+#ifdef __FreeBSD__
+ return __FreeBSD_version / 100000;
+#else
+ return 10;
+#endif
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77776/new/
https://reviews.llvm.org/D77776
More information about the cfe-commits
mailing list