[PATCH] D53815: [TableGen] Better error checking for TIED_TO constraints.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 31 17:35:10 PDT 2018


MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.

LGTM. Looks sensible to me, nitpicks below.

I'm not an expert in this area of tablegen though, so maybe wait a few days before committing (unless someone else accepts as well or someone has a complaint).



================
Comment at: utils/TableGen/CodeGenInstruction.cpp:255
+
+  std::string RHSOpName = Name.substr(wpos);
+  std::pair<unsigned,unsigned> RHSOp = Ops.ParseOperandName(RHSOpName, false);
----------------
can this be a StringRef or is `Name` destroyed/changed on the way?


================
Comment at: utils/TableGen/CodeGenInstruction.cpp:289
+  // before making it the target of this one.
+  for (auto Op : Ops) {
+    for (unsigned i = 0; i < Op.MINumOperands; i++)
----------------
I would prefer no `auto` when the type isn't immediately clear just by looking at the line at hand...


Repository:
  rL LLVM

https://reviews.llvm.org/D53815





More information about the llvm-commits mailing list