Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current module inside FunctionPass llvm

I'm writing a function pass in LLVM and need to call the method Module::getOrInsertFunction. I need to access the module of the current function. How do I get it?

like image 492
excavator Avatar asked Feb 06 '23 06:02

excavator


1 Answers

You can use getParent() function: http://llvm.org/docs/doxygen/html/classllvm_1_1GlobalValue.html#a9e1fc23a17e97d2d1732e753ae9251ac

like image 76
deLta Avatar answered Feb 23 '23 08:02

deLta