manmanren added a comment.
In https://reviews.llvm.org/D22636#493072, @benlangmuir wrote:
> > Can you point me to the source codes where we use rename to replace the
> > file? I am curious on how this all works out.
>
>
> This is the same as clang's handling of other output files. See
> {{CompilerInstance::createOutputFile}} and {{clearOutputFiles}}. When we are
> performing the GenerateModuleAction, the .pcm file will be the output file.
Thanks for the info!
>
>
> > What I described is a scenario I thought possible that can cause
> > "out-of-date" error:
>
> > module "B" is out of date and needs to be rebuilt
>
> > note: imported by module "A"
>
> > The only invocation of ReadAST that reads a module file and can't handle
> > out-of-date modules, is the path where we just built module "A" and tries
> > to load module "A" (here ModuleLoadCapabilities will be ARR_Missing).
>
>
> Right, here and in PCH loading (I assume your case doesn't involve a PCH).
> I'm concerned about adding this loop, because it removes the guarantee of
> progress. We should never need to build a module more than once in the same
> compilation. If we have a bug that's causing us to not be able to load a
> module that we just compiled, I think we need to fix the underlying problem,
> not just retry the build.
Yes, I agree. We should try to figure out the root cause. I gave the project
owner a root with debugging messages, but with this root, the error disappeared
:(
If you have suggestions on debugging this, let me know.
Thanks,
Manman
https://reviews.llvm.org/D22636
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits