]> granicus.if.org Git - clang/commitdiff
Fix path separator issue on Windows.
authorNikola Smiljanic <popizdeh@gmail.com>
Fri, 8 May 2015 03:26:15 +0000 (03:26 +0000)
committerNikola Smiljanic <popizdeh@gmail.com>
Fri, 8 May 2015 03:26:15 +0000 (03:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236804 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/HeaderSearch.cpp

index 04cdb0f69f7e77f62ee225f9d4834cd3d1471915..b316ccae6529d3bd7507e63d032122297ce7872d 100644 (file)
@@ -614,10 +614,8 @@ const FileEntry *HeaderSearch::LookupFile(
       const FileEntry *Includer = IncluderAndDir.first;
 
       // Concatenate the requested file onto the directory.
-      // FIXME: Portability.  Filename concatenation should be in sys::Path.
       TmpDir = IncluderAndDir.second->getName();
-      TmpDir.push_back('/');
-      TmpDir.append(Filename.begin(), Filename.end());
+      llvm::sys::path::append(TmpDir, Filename);
 
       // FIXME: We don't cache the result of getFileInfo across the call to
       // getFileAndSuggestModule, because it's a reference to an element of