This is an archive of the discontinued LLVM Phabricator instance.

[clang][lex][modules] Stop tracking number of includes
AbandonedPublic

Authored by jansvoboda11 on Nov 17 2021, 8:22 AM.

Details

Summary

This patch stops tracking the number of includes of a file. The information is not used anywhere except for stat printing. Only tracking the fact whether a file was included or not simplifies the code and should be more efficient.

Depends on D114095.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Nov 17 2021, 8:22 AM
jansvoboda11 requested review of this revision.Nov 17 2021, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2021, 8:22 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

I have a couple of nits inline, but otherwise LGTM if you squash with https://reviews.llvm.org/D114095.

clang/include/clang/Lex/Preprocessor.h
1230–1232

Looks like the comment (and function name) are bitrotting here. For the name, I suggest trackIncludeFile() or something.

1242

A using declaration for the DenseSet might be nice.

dexonsmith accepted this revision.Nov 17 2021, 12:55 PM
This revision is now accepted and ready to land.Nov 17 2021, 12:55 PM
jansvoboda11 abandoned this revision.Nov 18 2021, 9:11 AM

Squashed into D114095.