[all-commits] [llvm/llvm-project] 585f62: CodeGen: correct handling of debug info generation...

Saleem Abdulrasool via All-commits all-commits at lists.llvm.org
Tue Aug 16 14:27:26 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 585f62be1a438ca132aa443e556d102bc908a072
  Author: Saleem Abdulrasool <compnerd at compnerd.org>
  Date:   2022-08-16 (Tue, 16 Aug 2022)

  Changed paths:
    M clang/lib/CodeGen/CodeGenModule.cpp
    A clang/test/CodeGen/debug-info-alias-pointer.c

  Log Message:
  CodeGen: correct handling of debug info generation for aliases

When aliasing a static array, the aliasee is going to be a GEP which
points to the value.  We should strip pointer casts before forming the
reference.  This was occluded by the use of opaque pointers.

This problem has existed since the introduction of the debug info
generation for aliases in b1ea0191a42074341847d767609f66a26b6d5a41.  The
test case would assert due to the invalid cast with or without
`-no-opaque-pointers` at that revision.

Fixes: #57179

More information about the All-commits mailing list