tmsriram added inline comments.

================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:2056-2059
+  void replaceRawLinkageName(MDString *LinkageName) {
+    replaceOperandWith(3, LinkageName);
+  }
+
----------------
dblaikie wrote:
> The need to add this API makes me a bit uncertain that it's the right 
> direction - any chance you could find other examples of Function duplication 
> in LLVM passes (maybe the partial inliner? Perhaps when it partially inlines 
> an external function it has to clone the function so the external version 
> remains identical?) and how they deal with debug info? Perhaps there's an 
> existing API/mechanism to update the DISubprogram as you want without adding 
> this.
This does not seem like a radical new API to me.  We could use existing 
setOperand or replaceOperandWith here but need a public wrapper to expose it, 
just like getRawLinkageName.  For example, DICompositeType is mutated like this 
with buildODRType.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93656/new/

https://reviews.llvm.org/D93656

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to