[all-commits] [llvm/llvm-project] 7c3fa5: [DebugInfo] Skip ODRUniquing for mismatched tags

Yuanfang Chen via All-commits all-commits at lists.llvm.org
Tue Oct 26 15:28:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c3fa5278544d3830838148ac912cc4b927d1b5b
      https://github.com/llvm/llvm-project/commit/7c3fa5278544d3830838148ac912cc4b927d1b5b
  Author: Yuanfang Chen <yuanfang.chen at sony.com>
  Date:   2021-10-26 (Tue, 26 Oct 2021)

  Changed paths:
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/IR/Verifier.cpp
    A llvm/test/Linker/debug-info-bad-enum.ll
    A llvm/test/Verifier/dbg-invalid-enum-as-scope.ll
    M llvm/unittests/IR/DebugTypeODRUniquingTest.cpp

  Log Message:
  -----------
  [DebugInfo] Skip ODRUniquing for mismatched tags

Otherwise, ODRUniquing would map some member method/variable MDNodes
to have enum type DIScope, resulting in invalid debug info and bad
DWARF.

- Add a Verifier check that when a 'scope:' operand is an ODR type that is not an enum.
- Makes ODRUniquing apply to only ODR types with the same tag so that the debuginfo/DWARF is well-formed.

Reviewed By: probinson, aprantl

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




More information about the All-commits mailing list