[PATCH] D134428: [DebugInfo][InferAddressSpaces] Propagate DebugLoc when cloning an instruction in InferAddressSpaces

Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 04:54:14 PDT 2022


jmmartinez created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
jmmartinez requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134428

Files:
  llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp


Index: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
+++ llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
@@ -774,6 +774,7 @@
       if (NewI->getParent() == nullptr) {
         NewI->insertBefore(I);
         NewI->takeName(I);
+        NewI->setDebugLoc(I->getDebugLoc());
       }
     }
     return NewV;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134428.462136.patch
Type: text/x-patch
Size: 436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220922/1dad223f/attachment.bin>


More information about the llvm-commits mailing list