[PATCH] D76040: [TableGen] Move generated *Attr class methods out of line
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 11 21:50:25 PDT 2020
rnk marked an inline comment as done.
rnk added a comment.
The main things going out of line are:
- Create* factory methods
- Constructors
- Enum/string converters (use StringSwitch -> slow to instantiate)
Here's two examples from before & after:
https://reviews.llvm.org/P8203
https://reviews.llvm.org/P8204
The constructors and factory methods *could* be trivial, but some of them are quite complex.
================
Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:269
void writeAccessors(raw_ostream &OS) const override {
OS << " " << type << " get" << getUpperName() << "() const {\n";
----------------
Most trivial accessors are still defined inline, like here. I think there's only one override of writeAccesorDefinitions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76040/new/
https://reviews.llvm.org/D76040
More information about the cfe-commits
mailing list