[cfe-commits] r94003 - /cfe/trunk/lib/Frontend/InitHeaderSearch.cpp

Benjamin Kramer benny.kra at googlemail.com
Wed Jan 20 08:18:15 PST 2010


Author: d0k
Date: Wed Jan 20 10:18:11 2010
New Revision: 94003

URL: http://llvm.org/viewvc/llvm-project?rev=94003&view=rev
Log:
Don't store a Twine temporary, it's unsafe.

Modified:
    cfe/trunk/lib/Frontend/InitHeaderSearch.cpp

Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=94003&r1=94002&r2=94003&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Wed Jan 20 10:18:11 2010
@@ -189,10 +189,12 @@
 void InitHeaderSearch::AddMinGWCPlusPlusIncludePaths(llvm::StringRef Base,
                                                      llvm::StringRef Arch,
                                                      llvm::StringRef Version) {
-  llvm::Twine localBase = Base + "/" + Arch + "/" + Version + "/include";
-  AddPath(localBase, System, true, false, false);
-  AddPath(localBase + "/c++", System, true, false, false);
-  AddPath(localBase + "/c++/backward", System, true, false, false);
+  AddPath(Base + "/" + Arch + "/" + Version + "/include",
+          System, true, false, false);
+  AddPath(Base + "/" + Arch + "/" + Version + "/include/c++",
+          System, true, false, false);
+  AddPath(Base + "/" + Arch + "/" + Version + "/include/c++/backward",
+          System, true, false, false);
 }
 
   // FIXME: This probably should goto to some platform utils place.





More information about the cfe-commits mailing list