[PATCH] D45926: Fix DISubprogram while extracting instructions out of function

Tobias Edler von Koch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 09:06:57 PDT 2018


tobiasvk added inline comments.


================
Comment at: lib/Transforms/Utils/CloneFunction.cpp:137
 
   bool MustCloneSP =
       OldFunc->getParent() && OldFunc->getParent() == NewFunc->getParent();
----------------
How about changing this to `MustCloneSP = !ExtractingFunction && OldFunc->getParent() && OldFunc->getParent() == NewFunc->getParent()`. Then you can leave the if block right after unchanged.




https://reviews.llvm.org/D45926





More information about the llvm-commits mailing list