Author: adrian Date: Tue Jan 12 15:01:56 2016 New Revision: 257520 URL: http://llvm.org/viewvc/llvm-project?rev=257520&view=rev Log: Module debugging: Make the module format part of the module hash instead of the file name. This is consistent with how other HeaderSearchOptions are handled.
Due to the other inputs of the module hash (revision number) this is not really testable in a meaningful way. Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp cfe/trunk/lib/Lex/HeaderSearch.cpp Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=257520&r1=257519&r2=257520&view=diff ============================================================================== --- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original) +++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Jan 12 15:01:56 2016 @@ -2202,8 +2202,11 @@ std::string CompilerInvocation::getModul code = hash_combine(code, I->first, I->second); } - // Extend the signature with the sysroot. - code = hash_combine(code, hsOpts.Sysroot, hsOpts.UseBuiltinIncludes, + // Extend the signature with the sysroot and other header search options. + code = hash_combine(code, hsOpts.Sysroot, + hsOpts.ModuleFormat, + hsOpts.UseDebugInfo, + hsOpts.UseBuiltinIncludes, hsOpts.UseStandardSystemIncludes, hsOpts.UseStandardCXXIncludes, hsOpts.UseLibcxx); Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=257520&r1=257519&r2=257520&view=diff ============================================================================== --- cfe/trunk/lib/Lex/HeaderSearch.cpp (original) +++ cfe/trunk/lib/Lex/HeaderSearch.cpp Tue Jan 12 15:01:56 2016 @@ -153,8 +153,7 @@ std::string HeaderSearch::getModuleFileN auto FileName = llvm::sys::path::filename(ModuleMapPath); llvm::hash_code Hash = - llvm::hash_combine(DirName.lower(), FileName.lower(), - HSOpts->ModuleFormat, HSOpts->UseDebugInfo); + llvm::hash_combine(DirName.lower(), FileName.lower()); SmallString<128> HashStr; llvm::APInt(64, size_t(Hash)).toStringUnsigned(HashStr, /*Radix*/36); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits