This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] NFC: Report modules' context hash
ClosedPublic

Authored by jansvoboda11 on May 14 2021, 5:08 AM.

Details

Summary

This patch eagerly constructs and modifies CompilerInvocation of modular dependencies in order to report the correct context hash instead of the hash of the original translation unit.

No functionality change here, since we currently don't modify CompilerInvocation in a way that affects the context hash.

Depends on D102473.

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.May 14 2021, 5:08 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 14 2021, 5:08 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dexonsmith accepted this revision.May 14 2021, 11:27 AM

LGTM, although I'd slightly prefer the change to CompilerInstance.h be split out and committed after.

clang/include/clang/Frontend/CompilerInstance.h
230–232 ↗(On Diff #345402)

It'd be nice to remove this API separately in a follow up patch; the change to CompilerInstance.h is not necessary here so it's easy to split, focusing the patch on the relevant changes, and that pattern is easier for reverting (especially in out-of-tree code).

This revision is now accepted and ready to land.May 14 2021, 11:27 AM
This revision was landed with ongoing or failed builds.May 17 2021, 12:24 AM
This revision was automatically updated to reflect the committed changes.

Thanks for the review!

clang/include/clang/Frontend/CompilerInstance.h
230–232 ↗(On Diff #345402)