Consider this program: #include <stdio.h> static void exit(int X) { printf("myexit called\n"); } int main() { exit(1); } This should print 'myexit called' once. However: $ llvm-gcc -c -emit-llvm t.c $ lli t.o myexit called myexit called ERROR: exit(-1073744072) returned! Abort This is due to the failures of the Module::getOrInsertFunction method. -Chris
getOrInsertFunction fixed. lli fixed.