]> granicus.if.org Git - clang/commitdiff
Normalize target triple passed out of driver. Basically this means
authorAnton Korobeynikov <asl@math.spbu.ru>
Sat, 5 Mar 2011 16:05:17 +0000 (16:05 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sat, 5 Mar 2011 16:05:17 +0000 (16:05 +0000)
that at cc1 level we will always have normalized triple and thus can
provide necessary default based on e.g. environment value (e.g. for
"arm-eabi" triple, etc.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127087 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Driver.cpp

index 5a5986b5bc2bfaa835a48eee1ff2f3c61c622d96..ee225f25e8bc0513605dacdfb499bbd9f76907f0 100644 (file)
@@ -1323,7 +1323,7 @@ std::string Driver::GetTemporaryPath(const char *Suffix) const {
 
 const HostInfo *Driver::GetHostInfo(const char *TripleStr) const {
   llvm::PrettyStackTraceString CrashInfo("Constructing host");
-  llvm::Triple Triple(TripleStr);
+  llvm::Triple Triple(llvm::Triple::normalize(TripleStr).c_str());
 
   // TCE is an osless target
   if (Triple.getArchName() == "tce")