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?
You can use getParent() function: http://llvm.org/docs/doxygen/html/classllvm_1_1GlobalValue.html#a9e1fc23a17e97d2d1732e753ae9251ac
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With