diff options
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Support/Unix/Host.inc | 2 | ||||
-rw-r--r-- | llvm/lib/Support/Windows/Host.inc | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 29115c2f6d9..75d6a26cdb7 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2930,10 +2930,11 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args, 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( diff --git a/llvm/lib/Support/Unix/Host.inc b/llvm/lib/Support/Unix/Host.inc index 5580e63893c..b65f84bf444 100644 --- a/llvm/lib/Support/Unix/Host.inc +++ b/llvm/lib/Support/Unix/Host.inc @@ -64,5 +64,5 @@ std::string sys::getDefaultTargetTriple() { TargetTripleString = EnvTriple; #endif - return Triple::normalize(TargetTripleString); + return TargetTripleString; } diff --git a/llvm/lib/Support/Windows/Host.inc b/llvm/lib/Support/Windows/Host.inc index 90a6fb31670..58c4dc5d678 100644 --- a/llvm/lib/Support/Windows/Host.inc +++ b/llvm/lib/Support/Windows/Host.inc @@ -30,5 +30,5 @@ std::string sys::getDefaultTargetTriple() { Triple = EnvTriple; #endif - return Triple::normalize(Triple); + return Triple; } |