[all-commits] [llvm/llvm-project] 1083ec: [reland][DebugInfo] Update DIBuilder insertion to ...

Harald van Dijk via All-commits all-commits at lists.llvm.org
Thu Feb 13 02:47:04 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1083ec647f16314bcc9af8c4d6b11f50d288bca6
      https://github.com/llvm/llvm-project/commit/1083ec647f16314bcc9af8c4d6b11f50d288bca6
  Author: Harald van Dijk <harald.vandijk at codeplay.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M llvm/include/llvm/IR/DIBuilder.h
    M llvm/lib/IR/DIBuilder.cpp
    M llvm/lib/IR/DebugInfo.cpp
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    M llvm/lib/Transforms/Scalar/SROA.cpp
    M llvm/lib/Transforms/Utils/Debugify.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
    M llvm/unittests/IR/IRBuilderTest.cpp
    M llvm/unittests/Transforms/Utils/CloningTest.cpp

  Log Message:
  -----------
  [reland][DebugInfo] Update DIBuilder insertion to take InsertPosition (#126967)

After #124287 updated several functions to return iterators rather than
Instruction *, it was no longer straightforward to pass their result to
DIBuilder. This commit updates DIBuilder methods to accept an
InsertPosition instead, so that they can be called with an iterator
(preferred), or with a deprecation warning an Instruction *, or a
BasicBlock *. This commit also updates the existing calls to the
DIBuilder methods to pass in iterators.

As a special exception, DIBuilder::insertDeclare() keeps a separate
overload accepting a BasicBlock *InsertAtEnd. This is because despite
the name, this method does not insert at the end of the block, therefore
this cannot be handled implicitly by using InsertPosition.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list