aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-08-30 10:57:54 +0000
committerDuncan Sands <baldrick@free.fr>2010-08-30 10:57:54 +0000
commit12881e79b60886df8872045044f34d4ab3d79535 (patch)
tree4851aade4052bac15ec3cb8432109dc490180edb /lib/Support/Triple.cpp
parentcdd4f8c7cb0e5aa6e8d2b73f668c459936fe11d3 (diff)
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
Diffstat (limited to 'lib/Support/Triple.cpp')
-rw-r--r--lib/Support/Triple.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index 7806aec16c..3a95b65e69 100644
--- a/lib/Support/Triple.cpp
+++ b/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!");
}