]> granicus.if.org Git - clang/commitdiff
Additional safety for the root cause of regression in r223443; make the module
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 6 Dec 2014 00:09:19 +0000 (00:09 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 6 Dec 2014 00:09:19 +0000 (00:09 +0000)
map path more canonical before hashing it. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223547 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/HeaderSearch.cpp

index 131f6aa09cf824f747c927d0d76645bfec782dcc..bbbcf3abec673c62fd3b3c4b30104a72185df119 100644 (file)
@@ -137,6 +137,7 @@ std::string HeaderSearch::getModuleFileName(StringRef ModuleName,
     // error if they are imported in the same translation.
     SmallString<256> AbsModuleMapPath(ModuleMapPath);
     llvm::sys::fs::make_absolute(AbsModuleMapPath);
+    llvm::sys::path::native(AbsModuleMapPath);
     llvm::APInt Code(64, llvm::hash_value(AbsModuleMapPath.str().lower()));
     SmallString<128> HashStr;
     Code.toStringUnsigned(HashStr, /*Radix*/36);