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
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp
index b8f2b68..5bce70c 100644
--- a/tools/driver/cc1as_main.cpp
+++ b/tools/driver/cc1as_main.cpp
@@ -24,6 +24,7 @@
 #include "clang/Frontend/TextDiagnosticPrinter.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/StringSwitch.h"
+#include "llvm/ADT/Triple.h"
 #include "llvm/MC/MCParser/MCAsmParser.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCCodeEmitter.h"
@@ -142,7 +143,7 @@
   // Construct the invocation.
 
   // Target Options
-  Opts.Triple = Args->getLastArgValue(OPT_triple);
+  Opts.Triple = Triple::normalize(Args->getLastArgValue(OPT_triple));
   if (Opts.Triple.empty()) // Use the host triple if unspecified.
     Opts.Triple = sys::getHostTriple();