From 1b6744a37690832245a006797f01084e50f38fb3 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 30 Aug 2010 10:57:54 +0000 Subject: 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. llvm-svn: 112470 --- llvm/lib/Support/Triple.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'llvm/lib/Support/Triple.cpp') diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index 7806aec16c6..3a95b65e690 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -323,22 +323,6 @@ void Triple::Parse() const { Vendor = ParseVendor(getVendorName()); OS = ParseOS(getOSName()); - // Handle some exceptional cases where the OS / environment components are - // stuck into the vendor field. - // TODO: Remove this logic and have places that need it use 'normalize'. - if (StringRef(getTriple()).count('-') == 1) { - StringRef VendorName = getVendorName(); - - if (VendorName.startswith("mingw32")) { // 'i386-mingw32', etc. - Vendor = PC; - OS = MinGW32; - return; - } - - // arm-elf is another example, but we don't currently parse anything about - // the environment. - } - assert(isInitialized() && "Failed to initialize!"); } -- cgit v1.2.3