[PATCH] D34512: Add preliminary Cross Translation Unit support library

Rafael Stahl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 08:24:59 PDT 2017


r.stahl added a comment.

In https://reviews.llvm.org/D34512#877643, @xazax.hun wrote:

> - Unittests now creates temporary files at the correct location
> - Temporary files are also cleaned up when the process is terminated
> - Absolute paths are handled correctly by the library


I think there is an issue with this change.

First, the function map generation writes absolute paths to the map file. Now when the `parseCrossTUIndex` function parses it, it will no longer prepend the paths with the CTUDir and therefore expect the precompiled AST files at the exact path of the source file. This seems like a bad requirement, because the user would have to overwrite his source files.

If I understand your intention correctly, a fix would be to replace the `is_absolute` check with a check for `CTUDir == ""` in the `parseCrossTUIndex` function.


Repository:
  rL LLVM

https://reviews.llvm.org/D34512





More information about the cfe-commits mailing list