[llvm-commits] [llvm] r142684 - in /llvm/trunk: lib/Transforms/Utils/CloneFunction.cpp test/Transforms/Inline/blockaddress.ll
baldrick at free.fr
Fri Oct 21 23:40:43 CDT 2011
> + // It is only legal to clone a function if a block address within that
> + // function is never referenced outside of the function.
is this documented anywhere? The description of CloneFunction doesn't mention
it. Do callers of CloneFunction actually check for this? Note that it is
perfectly valid to use a block address in a different function, for example
storing it in some variable, passing it around - it just isn't legal to branch
to it from a different function. In short, is this fix really correct?
More information about the llvm-commits