Hello everybody. <br><br>I'm quite new to LLVM and I'm encontering problems with cloning basic blocks. My two basic blocks are in the same function and it doesn't really matter how the cloned one behave for the moment. Of course, to do so, I used the cloning.h 's method "CloneBasicBlock" but I have the "Instruction does not dominate all uses!" error. <br>
I know what it means, I just don't know how to get rid of it without getting more complicated errors. (I tried manipulating the VMap, the metadatas, cloning each instruction one by one,...). <br><br>Is there a way to know if an instruction is a definition (so I could remove or rename the value)? <br>
Is there a VMap book for newbies?<br>Is there some documentations I forgot to look at?<br><br><br>Thank you.<br><br><br><br>virtual BasicBlock* createAlteredBasicBlock(BasicBlock * basicBlock, const Twine & Name = "", Function * F = 0){<br>
<br> ValueToValueMapTy VMap;<br> BasicBlock * alteredBB = llvm::CloneBasicBlock (basicBlock, VMap, Name, F);<br><br> return alteredBB;<br>}<br><br>