summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2014-08-09 18:13:01 +0000
committerYaron Keren <yaron.keren@gmail.com>2014-08-09 18:13:01 +0000
commit1801d1b12fd6bd2f481efc94abbeda8f865724cb (patch)
tree8ceeee399ab6da813f138ecc8759a5579097d433
parent1d0d00f4e48974e09185ac193ddb361cc2926ceb (diff)
downloadbcm5719-llvm-1801d1b12fd6bd2f481efc94abbeda8f865724cb.tar.gz
bcm5719-llvm-1801d1b12fd6bd2f481efc94abbeda8f865724cb.zip
Fix six tests are failing on Windows after r215241-r215243.
Clang :: Frontend/iframework.c Clang :: Frontend/system-header-prefix.c Clang :: Index/annotate-comments-objc.m Clang :: Index/annotate-module.m Clang :: Index/index-module.m Clang :: Index/index-pch-with-module.m Clang :: PCH/case-insensitive-include.c Suprisingly the normalize_separators() was no-op when LLVM_ON_WIN32. Its replacement native() does change path separators into \ as expected, breaking these tests. I had fixed the tests by #ifndef LLVM_ON_WIN32 on the native call, to match the previous behaviour. If this logic is not used on Windows host, it might be completely deleted as there should not be windows path seperators on Linux hosts. I can't test on Linux but if someone can run tests on Linux after commenting out the line llvm::sys::path::native(NormalizedPath); and the tests pass, the whole if (LangOpts.MSVCCompat) could be deleted. llvm-svn: 215290
-rw-r--r--clang/lib/Lex/PPDirectives.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 0d2bb11ed9d..4c80bb2ada3 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -1441,7 +1441,9 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc,
SmallString<128> NormalizedPath;
if (LangOpts.MSVCCompat) {
NormalizedPath = Filename.str();
+#ifndef LLVM_ON_WIN32
llvm::sys::path::native(NormalizedPath);
+#endif
}
const FileEntry *File = LookupFile(
FilenameLoc, LangOpts.MSVCCompat ? NormalizedPath.c_str() : Filename,
OpenPOWER on IntegriCloud