[PATCH] D119899: [TableGen] Add a library-based entry point for parsing td files

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 14:48:21 PST 2022


rriddle added inline comments.


================
Comment at: llvm/lib/TableGen/Parser.cpp:35
+  // After parsing, reset the tablegen data.
+  detail::resetTablegenRecordContext();
+  SrcMgr = SourceMgr();
----------------
We could do this at the beginning and allow returning the RecordKeeper, but users would have to keep in mind that any successive call to this function will destroy any previously returned RecordKeeper. The current lifetime model of TableGen makes this quite annoying (that is more easily fixable now than it used to be, but someone still needs to put in a lot of the work to plumb through a context everywhere in TableGen code).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119899/new/

https://reviews.llvm.org/D119899



More information about the llvm-commits mailing list