From ab8ae19ea4285a15ca43123e8e218e401dc5cb5a Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 20 Jan 2010 16:18:11 +0000 Subject: [PATCH] Don't store a Twine temporary, it's unsafe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94003 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/InitHeaderSearch.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp index ea5389b44c..7b0b6b16b2 100644 --- a/lib/Frontend/InitHeaderSearch.cpp +++ b/lib/Frontend/InitHeaderSearch.cpp @@ -189,10 +189,12 @@ void InitHeaderSearch::AddGnuCPlusPlusIncludePaths(llvm::StringRef Base, 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.