[PATCH] Fix path concatenation in HeaderSearch
Yaron Keren
yaron.keren at gmail.com
Fri May 9 02:25:31 PDT 2014
Hi echristo, hans, dblaikie,
Fixed the FIXME: Filename concatenation done using llvm::sys::path::append.
http://reviews.llvm.org/D3686
Files:
tools/clang/lib/Lex/HeaderSearch.cpp
Index: tools/clang/lib/Lex/HeaderSearch.cpp
===================================================================
--- tools/clang/lib/Lex/HeaderSearch.cpp
+++ tools/clang/lib/Lex/HeaderSearch.cpp
@@ -621,10 +621,7 @@
I != E; ++I) {
const FileEntry *Includer = *I;
// Concatenate the requested file onto the directory.
- // FIXME: Portability. Filename concatenation should be in sys::Path.
- TmpDir = Includer->getDir()->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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3686.9238.patch
Type: text/x-patch
Size: 757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140509/a8c43094/attachment.bin>
More information about the cfe-commits
mailing list