This is an archive of the discontinued LLVM Phabricator instance.

[clang][AST] Refactoring ASTNameGenerator to use pimpl pattern (NFC).
ClosedPublic

Authored by plotfi on Jun 19 2019, 5:31 PM.

Details

Summary

So something I realized when trying to port clang interface stubs to using ASTNameGenerator instead of CodegenNameGenerator is that the original pimpl pattern used between CodegenNameGenerator and CodegenNameGeneratorImpl did a good job of hiding DataLayout making it so that users of CodegenNameGenerator did not need to link with llvm core. This is an NFC change to wrap ASTNameGenerator in a pimpl.

Diff Detail

Repository
rL LLVM

Event Timeline

plotfi created this revision.Jun 19 2019, 5:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2019, 5:31 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
plotfi edited the summary of this revision. (Show Details)Jun 19 2019, 5:35 PM
plotfi updated this revision to Diff 205728.Jun 19 2019, 5:39 PM

moving datalayout.h

plotfi updated this revision to Diff 205729.Jun 19 2019, 5:42 PM

full context

plotfi marked an inline comment as done.Jun 19 2019, 5:43 PM
plotfi added inline comments.
clang/lib/AST/Mangle.cpp
343 ↗(On Diff #205729)

@aaron.ballman I can move this down to the private section in a subsequent NFC if you'd like.

compnerd accepted this revision.Jun 19 2019, 6:51 PM
compnerd added inline comments.
clang/lib/AST/Mangle.cpp
343 ↗(On Diff #205729)

The implementation is never leaked to the user. This means that this is effectively private.

416 ↗(On Diff #205729)

Don't think that it really matters to make this private or public really. The implementation is fully private.

473 ↗(On Diff #205729)

llvm::make_unique would be nicer.

This revision is now accepted and ready to land.Jun 19 2019, 6:51 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2019, 10:57 PM