[PATCH] D60910: [WIP] Dumping the AST to JSON

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 10:05:54 PDT 2019

hintonda added inline comments.

Comment at: include/clang/Frontend/FrontendOptions.h:311
+  /// Specifies the output format of the AST.
+  enum ASTOutputFormat {
+    AOF_Default,
aaron.ballman wrote:
> hintonda wrote:
> > Why can't you use the enum defined in `clang/AST/ASTDumperUtils.h`?  Seems to make the `dump()` call below unnecessarily ugly.
> I thought there would be a layering violation if AST and Frontend colluded on that, but I see now that Frontend already links against AST, so perhaps there isn't a layering violation after all?
> I'll investigate to see if this can be cleaned up.
I think that Frontend uses AST, e.g., ASTContext, but not the other way around.



More information about the cfe-commits mailing list