[PATCH] D96446: [flang][fir][NFC] Move CharacterType and BoxCharType to TableGen type definition
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 13:52:30 PST 2021
mehdi_amini added inline comments.
================
Comment at: flang/include/flang/Optimizer/Dialect/FIRTypes.td:51
+def A_CharacterType : FIR_Type<"Character", "char"> {
+ let summary = "FIR character type";
----------------
clementval wrote:
> @mehdi_amini @rriddle I'm currently forcing this type to be generated before BoxCharType because it depends on it. Is there a better way to achieve this than adding a prefix (`A_`)?
Is this a matter of updating the TableGen backend to forward declare all classes before emitting the content?
I had to do this with operations a while ago for a similar reason.
================
Comment at: flang/include/flang/Optimizer/Dialect/FIRTypes.td:116
+ }];
+}
+
----------------
you have a non negligible amount of C++ here, consider replacing this with simple calls to static functions implemented in the cpp file. TableGen files don't have all the C++ IDE features...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96446/new/
https://reviews.llvm.org/D96446
More information about the llvm-commits
mailing list