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
This commit is contained in:
Benjamin Kramer 2010-01-20 16:18:11 +00:00
Родитель 763f7d64f1
Коммит ab8ae19ea4
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -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.