diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-07-08 20:17:28 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-07-08 20:17:28 +0000 |
commit | a6e023c4491a8a8116c11783f4e81c7bd172f88d (patch) | |
tree | 6ad32fdd4a33048cda1f82b63a29f403d75545c5 /lib/Lex/HeaderSearch.cpp | |
parent | 82007c3a3f60ce2299c74333a881e4fdfc2135ce (diff) |
Fix up dependency file name printing to more closely match that of gcc, including fixing a nasty recent regression that could make us print "/foo.h" with a command-line including "-I ./".
rdar://problem/9734352
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | lib/Lex/HeaderSearch.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index bb4388195a..86ab9564a2 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/lib/Lex/HeaderSearch.cpp @@ -123,10 +123,8 @@ const FileEntry *DirectoryLookup::LookupFile( llvm::SmallString<1024> TmpDir; if (isNormalDir()) { // Concatenate the requested file onto the directory. - // FIXME: Portability. Filename concatenation should be in sys::Path. - TmpDir += getDir()->getName(); - TmpDir.push_back('/'); - TmpDir.append(Filename.begin(), Filename.end()); + TmpDir = getDir()->getName(); + llvm::sys::path::append(TmpDir, Filename); if (SearchPath != NULL) { llvm::StringRef SearchPathRef(getDir()->getName()); SearchPath->clear(); |