[all-commits] [llvm/llvm-project] 241f93: [TableGen] Fix source location for anonymous recor...

Rahul Joshi via All-commits all-commits at lists.llvm.org
Thu Oct 3 06:17:18 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 241f93658a8a9509216b841d3272194bd34fed36
      https://github.com/llvm/llvm-project/commit/241f93658a8a9509216b841d3272194bd34fed36
  Author: Rahul Joshi <rjoshi at nvidia.com>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M llvm/include/llvm/TableGen/Record.h
    M llvm/lib/TableGen/Record.cpp
    M llvm/lib/TableGen/TGParser.cpp
    A llvm/test/TableGen/anonymous-location.td

  Log Message:
  -----------
  [TableGen] Fix source location for anonymous records (#110935)

Fix source location for anonymous records to be the one of the locations
where that record is instantiated as opposed to the location of the
class that was anonymously instantiated.

Currently, when a record is anonymously instantiated (via
`VarDefInit::instantiate`), we use the location of the class for the
record, which is not correct. Instead, pass in the `SMLoc` for the
location where the anonymous instantiation happens and use that location
when the record is instantiated. If there are multiple anonymous
instantiations with the same parameters, the location for the (single)
record created will be one of these instantiation locations as opposed
to the class location.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list