r223547 - Additional safety for the root cause of regression in r223443; make the module
Richard Smith
richard-llvm at metafoo.co.uk
Fri Dec 5 16:09:20 PST 2014
Author: rsmith
Date: Fri Dec 5 18:09:19 2014
New Revision: 223547
URL: http://llvm.org/viewvc/llvm-project?rev=223547&view=rev
Log:
Additional safety for the root cause of regression in r223443; make the module
map path more canonical before hashing it. No functionality change.
Modified:
cfe/trunk/lib/Lex/HeaderSearch.cpp
Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=223547&r1=223546&r2=223547&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/HeaderSearch.cpp (original)
+++ cfe/trunk/lib/Lex/HeaderSearch.cpp Fri Dec 5 18:09:19 2014
@@ -137,6 +137,7 @@ std::string HeaderSearch::getModuleFileN
// 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);
More information about the cfe-commits
mailing list