From 426032f8a1b85d9b6a32325a18fbbdf0741d272d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sat, 6 Dec 2014 00:09:19 +0000 Subject: [PATCH] Additional safety for the root cause of regression in r223443; make the module 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index 131f6aa09c..bbbcf3abec 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/lib/Lex/HeaderSearch.cpp @@ -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); -- 2.40.0