[all-commits] [llvm/llvm-project] 9dcae2: [DebugInfo] Add DW_ATE_complex_float case to asser...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Mon Jun 12 09:10:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9dcae2f524e7bd9c6655778fb3c4c5cac05180cb
      https://github.com/llvm/llvm-project/commit/9dcae2f524e7bd9c6655778fb3c4c5cac05180cb
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2023-06-12 (Mon, 12 Jun 2023)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
    A llvm/test/DebugInfo/X86/DW_ATE_complex_float.ll

  Log Message:
  -----------
  [DebugInfo] Add DW_ATE_complex_float case to assert in isUnsignedDIType

Without this patch a `DW_ATE_complex_float` encoding trips an assertion in
`DebugHandlerBase::isUnsignedDIType` with the message `"Unsupported
encoding"`.

By adding a case to the `assert` for `DW_ATE_complex_float` it becomes
supported, behaving in the same way as the already supported `DW_ATE_float`
type (return false).

Note: For the reported reproducer:

    #include <complex.h>
    int main() {
      long double complex r1;
    }

The assertion isn't tripped without assignment tracking because instcombine
deletes everything, including the `dbg.declare`, without recovering any
location information. Whereas with assignment tracking we track a zeroing
memset that is emitted by clang.

Reviewed By: probinson

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




More information about the All-commits mailing list