shashikiran
shashikiran

Reputation: 379

Add function definition in llvm IR

I'd like to insert following function definition to llvm IR

 define internal void @main.new.fn(i8* nocapture %.data) nounwind {
 enrty:
 ....
 }

Can someone please suggest a method for this function insertion?

Upvotes: 2

Views: 608

Answers (1)

SK-logic
SK-logic

Reputation: 9725

Use the LLVM cpp backend to get an answer to this and any other similar question.

Also, there is online demo page, which can emit C++ code for given source.

Upvotes: 2

Related Questions