[PATCH] D47153: [Support] Avoid normalization in sys::getDefaultTargetTriple

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 25 13:43:38 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL333307: [Support] Avoid normalization in sys::getDefaultTargetTriple (authored by phosek, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D47153?vs=148634&id=148662#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D47153

Files:
  cfe/trunk/lib/Frontend/CompilerInvocation.cpp
  llvm/trunk/lib/Support/Unix/Host.inc
  llvm/trunk/lib/Support/Windows/Host.inc


Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp
@@ -2930,10 +2930,11 @@
   Opts.FPMath = Args.getLastArgValue(OPT_mfpmath);
   Opts.FeaturesAsWritten = Args.getAllArgValues(OPT_target_feature);
   Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version);
-  Opts.Triple = llvm::Triple::normalize(Args.getLastArgValue(OPT_triple));
+  Opts.Triple = Args.getLastArgValue(OPT_triple);
   // Use the default target triple if unspecified.
   if (Opts.Triple.empty())
     Opts.Triple = llvm::sys::getDefaultTargetTriple();
+  Opts.Triple = llvm::Triple::normalize(Opts.Triple);
   Opts.OpenCLExtensionsAsWritten = Args.getAllArgValues(OPT_cl_ext_EQ);
   Opts.ForceEnableInt128 = Args.hasArg(OPT_fforce_enable_int128);
   Opts.NVPTXUseShortPointers = Args.hasFlag(
Index: llvm/trunk/lib/Support/Windows/Host.inc
===================================================================
--- llvm/trunk/lib/Support/Windows/Host.inc
+++ llvm/trunk/lib/Support/Windows/Host.inc
@@ -30,5 +30,5 @@
     Triple = EnvTriple;
 #endif
 
-  return Triple::normalize(Triple);
+  return Triple;
 }
Index: llvm/trunk/lib/Support/Unix/Host.inc
===================================================================
--- llvm/trunk/lib/Support/Unix/Host.inc
+++ llvm/trunk/lib/Support/Unix/Host.inc
@@ -64,5 +64,5 @@
     TargetTripleString = EnvTriple;
 #endif
 
-  return Triple::normalize(TargetTripleString);
+  return TargetTripleString;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47153.148662.patch
Type: text/x-patch
Size: 1599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180525/9d73c644/attachment.bin>


More information about the llvm-commits mailing list