[PATCH] D83588: [TableGen][CGS] Print better errors on overlapping InstRW

Jon Roelofs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 07:46:20 PDT 2020


jroelofs marked an inline comment as done.
jroelofs added inline comments.


================
Comment at: llvm/utils/TableGen/CodeGenSchedule.cpp:1093
                    "\".");
+              PrintFatalError(RWD->getLoc(), "Previous match was here.");
             }
----------------
evandro wrote:
> Or rather, continuing from the previous line:
> 
> 
> ```
> "\"" +
> " at " + RWD->getLoc());
> ```
I considered that, but felt that the way the error messages get printed was better when each loc is emitted as a separate diagnostic (so it shows you a bit of relevant source code for each). If there were a proper DiagnosticsEngine I'd prefer to emit this second part as a `note:`, with the first as the `error:`, but TableGen diagnostics aren't well set up for that, and adding `PrintFatalNote` seemed weird.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83588





More information about the llvm-commits mailing list