Moved construction of TargetInfo objects out of the Driver
and into the "Basic" library. TargetInfo objects are now
constructed from triples by calling the static method
TargetInfo::CreateTargetInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44940 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/TranslationUnit.cpp b/Driver/TranslationUnit.cpp
index 6f35a32..f5c6cff 100644
--- a/Driver/TranslationUnit.cpp
+++ b/Driver/TranslationUnit.cpp
@@ -189,14 +189,14 @@
   // Read the LangOptions.
   TU->LangOpts.Read(Dezr);
   
-  { 
-    // Read the TargetInfo.
+  { // Read the TargetInfo.
     llvm::SerializedPtrID PtrID = Dezr.ReadPtrID();
     char* triple = Dezr.ReadCStr(NULL,0,true);
-    std::vector<std::string> triples;
-    triples.push_back(triple);
+    std::string Triple(triple);
+    Dezr.RegisterPtr(PtrID,TargetInfo::CreateTargetInfo(SrcMgr,
+                                                        &Triple,
+                                                        &Triple+1));
     delete [] triple;
-    Dezr.RegisterPtr(PtrID,CreateTargetInfo(SrcMgr,triples,NULL));
   }
   
   // For Selectors, we must read the identifier table first because the