From 8356608d43f0bc40f235cfedd82feed0741c9aad Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 10 Dec 2013 02:36:28 +0000 Subject: [PATCH] Revert r196859, "Use llvm::sys::path::append to concatenate paths", to appease FileManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196865 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/HeaderSearch.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index 17d518b8d8..9e43dda226 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/lib/Lex/HeaderSearch.cpp @@ -549,9 +549,12 @@ const FileEntry *HeaderSearch::LookupFile( // a subsequent include of "baz.h" should resolve to "whatever/foo/baz.h". // This search is not done for <> headers. if (CurFileEnt && !isAngled && !NoCurDirSearch) { + SmallString<1024> TmpDir; // Concatenate the requested file onto the directory. - SmallString<1024> TmpDir(CurFileEnt->getDir()->getName()); - llvm::sys::path::append(TmpDir, Filename); + // FIXME: Portability. Filename concatenation should be in sys::Path. + TmpDir += CurFileEnt->getDir()->getName(); + TmpDir.push_back('/'); + TmpDir.append(Filename.begin(), Filename.end()); if (const FileEntry *FE = FileMgr.getFile(TmpDir.str(),/*openFile=*/true)) { // Leave CurDir unset. // This file is a system header or C++ unfriendly if the old file is. -- 2.40.0