[all-commits] [llvm/llvm-project] 015064: [DebugInfo] Do not replace existing nodes from DIC...

Ellis Hoag via All-commits all-commits at lists.llvm.org
Mon Nov 29 19:46:43 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0150645bf5ae0d55866e77d2bec5aad4e5226b7c
      https://github.com/llvm/llvm-project/commit/0150645bf5ae0d55866e77d2bec5aad4e5226b7c
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2021-11-29 (Mon, 29 Nov 2021)

  Changed paths:
    M llvm/lib/IR/DIBuilder.cpp
    M llvm/unittests/IR/IRBuilderTest.cpp

  Log Message:
  -----------
  [DebugInfo] Do not replace existing nodes from DICompileUnit

When creating a new DIBuilder with an existing DICompileUnit, load the
DINodes from the current DICompileUnit so they don't get overwritten.
This is done in the MachineOutliner pass, but it didn't change the CU so
the bug never appeared. We need this if we ever want to add DINodes to
the CU after it has been created, e.g., DIGlobalVariables.

Reviewed By: dblaikie

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




More information about the All-commits mailing list