[LLVMdev] Function insertion

Chris Lattner clattner at apple.com
Sun May 2 07:22:35 PDT 2010


On May 1, 2010, at 11:17 PM, Adarsh Yoga wrote:

> Is there a way to insert a function at the start of a module rather than inserting it at the end, which happens by default?

You can create the function without specifying the module to insert into, then use M.getFunctionList().insert(..) to put it wherever you like.

-Chris



More information about the llvm-dev mailing list