[all-commits] [llvm/llvm-project] 1cbba5: [ObjC][CodeGen] Fix missing debug info in situatio...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Tue Mar 30 02:07:54 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1cbba533ec93864caab8ad2f3fd4293a56723307
      https://github.com/llvm/llvm-project/commit/1cbba533ec93864caab8ad2f3fd4293a56723307
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:
    M clang/lib/CodeGen/CGDebugInfo.cpp
    A clang/test/CodeGenObjC/debug-info-property-class-instance-same-name.m

  Log Message:
  -----------
  [ObjC][CodeGen] Fix missing debug info in situations where an instance and class property have the same identifier

Since the introduction of class properties in Objective-C it is possible to declare a class and an instance
property with the same identifier in an interface/protocol.

Right now Clang just generates debug information for whatever property comes first in the source file.
The second property is ignored as it's filtered out by the set of already emitted properties (which is just
using the identifier of the property to check for equivalence).  I don't think generating debug info in this case
was never supported as the identifier filter is in place since 7123bca7fb6e1dde51be8329cfb523d2bb9ffadf
(which precedes the introduction of class properties).

This patch expands the filter to take in account identifier + whether the property is class/instance. This
ensures that both properties are emitted in this special situation.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D99512




More information about the All-commits mailing list