llvm.org GIT mirror llvm / 12881e7
Remove a hack that tries to understand incorrect triples from the Triple class constructor. Only valid triples should now be used inside LLVM - front-ends are now responsable for rejecting or correcting invalid target triples. The Triple::normalize method can be used to straighten out funky triples provided by users. Give this a whirl through the buildbots to see if I caught all places where triples enter LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112470 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan Sands 8 years ago
2 changed file(s) with 5 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
347347 SMDiagnostic takes different parameters now. //FIXME: how to upgrade?
348348
349349
  • 350 The constructor for the Triple class no longer tries to understand odd triple
    351 specifications. Frontends should ensure that they only pass valid triples to
    352 LLVM. The Triple::normalize utility method has been added to help front-ends
    353 deal with funky triples.
    354
  • 350355 Some APIs got renamed:
    351356
    352357
  • llvm_report_error -> report_fatal_error
  • 322322 Vendor = ParseVendor(getVendorName());
    323323 OS = ParseOS(getOSName());
    324324
    325 // Handle some exceptional cases where the OS / environment components are
    326 // stuck into the vendor field.
    327 // TODO: Remove this logic and have places that need it use 'normalize'.
    328 if (StringRef(getTriple()).count('-') == 1) {
    329 StringRef VendorName = getVendorName();
    330
    331 if (VendorName.startswith("mingw32")) { // 'i386-mingw32', etc.
    332 Vendor = PC;
    333 OS = MinGW32;
    334 return;
    335 }
    336
    337 // arm-elf is another example, but we don't currently parse anything about
    338 // the environment.
    339 }
    340
    341325 assert(isInitialized() && "Failed to initialize!");
    342326 }
    343327