[PATCH] D48849: [Driver][Darwin] Use Host Triple to infer target os version

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 2 16:57:42 PDT 2018

arphaman added a comment.

Nit: Could you please try to extract the shared code into a function, e.g.

  Optional<std::string> overrideMacOSTripleDefaultVersion(const llvm::Triple &Triple, ... OSTy, ... TheDriver) {
      if (Triple.getOSMajorVersion())
        return None;
      llvm::Triple SystemTriple(llvm::sys::getProcessTriple());
      if (SystemTriple.isMacOSX())
        return getOSVersion(OSTy, SystemTriple, TheDriver));
     return None;

  rC Clang


More information about the cfe-commits mailing list