[LLVMdev] Changes in llvm::Instruction and subclasses
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed May 26 19:26:01 PDT 2004
This should not affect current code but it may help people who deal with
LLVM instructions. Up till now one could create an llvm::Instruction
(and subclasses) using the following constructor:
Instruction(const Type *Ty, unsigned iType, const std::string &Name ="",
Instruction *InsertBefore = 0);
If InsertBefore was specified the instruction was added to the basic
block InsertBefore was in, right after InsertBefore. While writing my
frontend this was never the case; I always wanted to append to the end
of a basic block. So I introduced this constructor variant:
Instruction(const Type *Ty, unsigned iType, const std::string &Name,
BasicBlock *InsertAtEnd);
which inserts the newly created instruction to the end of InsertAtEnd
basic block.
I hope others will find this useful.
--
Alkis
More information about the llvm-dev
mailing list