[PATCH] D42794: [DeadArgumentElim] Set pointer to DISubprogram before calling RAUW. NFC
Petar Jovanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 03:14:23 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324335: [DeadArgumentElim] Set pointer to DISubprogram before calling RAUW. NFC (authored by petarj, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D42794?vs=132812&id=132965#toc
Repository:
rL LLVM
https://reviews.llvm.org/D42794
Files:
llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Index: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -825,6 +825,9 @@
F->getParent()->getFunctionList().insert(F->getIterator(), NF);
NF->takeName(F);
+ // Patch the pointer to LLVM function in debug info descriptor.
+ NF->setSubprogram(F->getSubprogram());
+
// Loop over all of the callers of the function, transforming the call sites
// to pass in a smaller number of arguments into the new function.
std::vector<Value*> Args;
@@ -1017,9 +1020,6 @@
BB.getInstList().erase(RI);
}
- // Patch the pointer to LLVM function in debug info descriptor.
- NF->setSubprogram(F->getSubprogram());
-
// Now that the old function is dead, delete it.
F->eraseFromParent();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42794.132965.patch
Type: text/x-patch
Size: 916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180206/df97e5a3/attachment.bin>
More information about the llvm-commits
mailing list