================
@@ -584,12 +584,21 @@ void
ModulesBuilder::ModulesBuilderImpl::getPrebuiltModuleFile(
if (BuiltModuleFiles.isModuleUnitBuilt(ModuleName))
continue;
- if (IsModuleFileUpToDate(ModuleFilePath, BuiltModuleFiles,
+ // Convert relative path to absolute path based on the compilation
directory
+ llvm::SmallString<256> AbsoluteModuleFilePath;
+ if (llvm::sys::path::is_relative(ModuleFilePath)) {
+ AbsoluteModuleFilePath = Inputs.CompileCommand.Directory;
+ llvm::sys::path::append(AbsoluteModuleFilePath, ModuleFilePath);
+ } else {
+ AbsoluteModuleFilePath = ModuleFilePath;
+ }
----------------
ArcsinX wrote:
nit: remove braces here to follow LLVM coding standard
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
https://github.com/llvm/llvm-project/pull/187654
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits