[llvm-dev] Wrapper functions for standard library functions

Barbora Murinová via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 26 16:40:08 PST 2017


Hi,

I would like to wrap some of the library functions such as malloc() into
for example:

malloc_wrapper(int size) {
    malloc(size+4);  //call the real malloc here
}

and have all uses of malloc replaced with malloc_wrapper. Is there a way to
do that?

-- 
----------------
Barbora Murinová
The University of Edinburgh
SK: +421905718390 <+421%20905%20718%20390>
UK: +447477833795 <+44%207477%20833795>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171227/8d1d3fdd/attachment.html>


More information about the llvm-dev mailing list