Remove the first layer of support for "portability" warnings. This is
theoretically useful, but not useful in practice. It adds a bunch of
complexity, and not much value. It's best to nuke it. One big advantage
is that it means the target interfaces will soon lose their SLoc arguments
and target queries can never emit diagnostics anymore (yay). Removing this
also simplifies some of the core preprocessor which should make it slightly
faster.
Ted, I didn't simplify TripleProcessor, which can now have at most one
triple, and can probably just be removed. Please poke at it when you have
time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/TranslationUnit.cpp b/AST/TranslationUnit.cpp
index c00b344..b91448b 100644
--- a/AST/TranslationUnit.cpp
+++ b/AST/TranslationUnit.cpp
@@ -191,9 +191,7 @@
{ // Read the TargetInfo.
llvm::SerializedPtrID PtrID = Dezr.ReadPtrID();
char* triple = Dezr.ReadCStr(NULL,0,true);
- std::string Triple(triple);
- Dezr.RegisterPtr(PtrID,TargetInfo::CreateTargetInfo(&Triple,
- &Triple+1));
+ Dezr.RegisterPtr(PtrID,TargetInfo::CreateTargetInfo(std::string(triple)));
delete [] triple;
}