]> granicus.if.org Git - clang/commitdiff
Fix a think-o. Fixes PR8606.
authorChandler Carruth <chandlerc@gmail.com>
Mon, 15 Nov 2010 09:28:23 +0000 (09:28 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 15 Nov 2010 09:28:23 +0000 (09:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119139 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/InitHeaderSearch.cpp

index 733adbf8b9263ac5bde5d262ffb3f321ba505508..6ea7ecb8703e965a948d85f4f49fd9748667eed1 100644 (file)
@@ -113,6 +113,7 @@ void InitHeaderSearch::AddPath(const llvm::Twine &Path,
   if (Group == System && !IgnoreSysRoot && MappedPath.isAbsolute() &&
       IncludeSysroot.isValid() && IncludeSysroot.isAbsolute() &&
       IncludeSysroot != llvm::sys::Path::GetRootDirectory()) {
+    MappedPathStorage.clear();
     MappedPathStr =
       (IncludeSysroot.str() + Path).toStringRef(MappedPathStorage);
   }