[LLVMdev] Fwd: updating module references in call instructions after a module clone

charles quarra charllsnotieneningunputocorreo at gmail.com
Thu Dec 6 09:43:41 PST 2012

(i hope bumping my own question as a way for begging attention is not
too frowned upon on the list, otherwise i can adjust the frequency as
low as required)

suppose module B has call/InvokeInst to calls in module A
after i clone both modules i get B' and A'
my concrete question is this:
Are there any special steps that i need to do before linking the
modules B' and A' together?

my main concern is that B' will have call/InvokeInst pointing to
module A, not A', and the linker will not be able to notice that it
should replace A' references with A

The reason for linking B' and A' instead of A and B is to avoid
rebuilding all modules when only a few of them change

any suggestions about this are greatly welcome

More information about the llvm-dev mailing list