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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to