summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit1b6744a37690832245a006797f01084e50f38fb3 (patch)
treededcf4fbe12fdd788030ce64cc65ac5d2423b4ad /llvm
parent68c30907cc2cc204906ee4bee851f647e79d12b7 (diff)
downloadbcm5719-llvm-1b6744a37690832245a006797f01084e50f38fb3.tar.gz
bcm5719-llvm-1b6744a37690832245a006797f01084e50f38fb3.zip
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
Diffstat (limited to 'llvm')
-rw-r--r--llvm/docs/ReleaseNotes.html5
-rw-r--r--llvm/lib/Support/Triple.cpp16
2 files changed, 5 insertions, 16 deletions
diff --git a/llvm/docs/ReleaseNotes.html b/llvm/docs/ReleaseNotes.html
index f9f492c2639..b937f7d8713 100644
--- a/llvm/docs/ReleaseNotes.html
+++ b/llvm/docs/ReleaseNotes.html
@@ -348,6 +348,11 @@ expose new optimization opportunities:</p>
SMDiagnostic takes different parameters now. //FIXME: how to upgrade?
</li>
<li>
+ The constructor for the Triple class no longer tries to understand odd triple
+ specifications. Frontends should ensure that they only pass valid triples to
+ LLVM. The Triple::normalize utility method has been added to help front-ends
+ deal with funky triples.
+<li>
Some APIs got renamed:
<ul>
<li>llvm_report_error -&gt; report_fatal_error</li>
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!");
}
OpenPOWER on IntegriCloud