[all-commits] [llvm/llvm-project] cac4d7: [CodeGen] Only consider innermost cast for !heapal...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue May 9 00:49:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cac4d7ff4652815e12132c990a62d68873ba4b9e
      https://github.com/llvm/llvm-project/commit/cac4d7ff4652815e12132c990a62d68873ba4b9e
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/test/CodeGen/debug-info-codeview-heapallocsite.c

  Log Message:
  -----------
  [CodeGen] Only consider innermost cast for !heapallocsite

Without opaque pointers, this code determined !heapallocsite based
on the innermost cast of the allocation call. With opaque pointers,
the casts no longer generate an instruction, so the outermost cast
is used. Add an explicit check for nested casts to prevent this.

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




More information about the All-commits mailing list