diff options
author | Duncan Sands <baldrick@free.fr> | 2010-08-30 09:42:39 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-08-30 09:42:39 +0000 |
commit | 2dc14532b641bae011a374e2c6c393d2196c1411 (patch) | |
tree | e58374604c80fe43eec8dfe08043cf4391c543e9 /lib/Frontend/CompilerInvocation.cpp | |
parent | 75b8508380e6d44276a8fafe5cafcedb9cf532d3 (diff) |
Straighten out target triples provided on the command line
before using them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 68e2d846c5..c4ecf61ce2 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -23,6 +23,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/ADT/Triple.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/System/Host.h" #include "llvm/System/Path.h" @@ -1472,7 +1473,7 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) { Opts.CPU = Args.getLastArgValue(OPT_target_cpu); Opts.Features = Args.getAllArgValues(OPT_target_feature); Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version); - Opts.Triple = Args.getLastArgValue(OPT_triple); + Opts.Triple = llvm::Triple::normalize(Args.getLastArgValue(OPT_triple)); // Use the host triple if unspecified. if (Opts.Triple.empty()) |