[PATCH] D105118: [remangleIntrinsicFunction] Detect and resolve name clash

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 09:45:25 PDT 2021


apilipenko added inline comments.


================
Comment at: llvm/lib/IR/Function.cpp:1667
+  Function *NewDecl = nullptr;
+  if (auto *ExistingGV = F->getParent()->getNamedValue(WantedName)) {
+    if (auto *ExistingF = dyn_cast<Function>(ExistingGV))
----------------
I think it should be remangleIntrinsicFunction caller responsibility to do this kind of adjustment. Some of the callers (like LLParser) will just assert that the resulting function matches the signature. Others, like bitcode reader, will need to handle this situation.


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

https://reviews.llvm.org/D105118



More information about the llvm-commits mailing list