[PATCH] D88600: [TableGen] New backend to print fully detailed records

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 09:58:22 PDT 2020


lattner added inline comments.


================
Comment at: llvm/lib/Support/SourceMgr.cpp:210
+    return FileSpec.substr(I).str() + ":" +
+           std::to_string(FindLineNumber(Loc, BufferID));
+  }
----------------
Paul-C-Anagnostopoulos wrote:
> lattner wrote:
> > Shouldn't this also include column numbers?
> > 
> > Making this utility accessible to other clients of SourceMgr is nice, but if so, please change SourceMgr itself to use it for its internal formatting of the location information.  This ensures that things stay consistent.
> While testing the new backend, I found the column numbers to be of no use. The primary purpose of showing the source locations is to help people figure out the path that a record or field took through all the TableGen definitions. Knowing the column number of, say, the value of a field is no more useful than knowing the line number of its definition.
> 
> I will investigate using this new function in the SourceMgr itself.
Ok, no problem.  This just means that this method isn't a general "SourceMgr::getFormattedLocation" method, it is something specific to the tblgen backend.  Please move it there, and the concern is addressed, thanks!


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

https://reviews.llvm.org/D88600



More information about the llvm-commits mailing list