[PATCH] Fix path concatenation in HeaderSearch

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri May 9 10:33:55 PDT 2014


Does this fix any bug or is just a cleanup? If it fixes a bug, can you
include a testcase?

On 9 May 2014 05:25, Yaron Keren <yaron.keren at gmail.com> wrote:
> 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
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



More information about the cfe-commits mailing list