[PATCH] D35106: [cloning] Do not duplicate types when cloning functions
Keno Fischer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 7 00:44:34 PDT 2017
loladiro accepted this revision.
loladiro added a comment.
This revision is now accepted and ready to land.
The implementation of this looks good to me. I guess I'm not entirely sure why it's necessary for that type to be distinct in the first place, but that's probably a different discussion from just fixing this bug.
================
Comment at: lib/Transforms/Utils/CloneFunction.cpp:49
bool hasCalls = false, hasDynamicAllocas = false, hasStaticAllocas = false;
-
+ Module *TheModule = F ? F->getParent() : nullptr;
+
----------------
Does this ever get called without a valid `F`?
https://reviews.llvm.org/D35106
More information about the llvm-commits
mailing list