#include <stdio.h> extern "C" void NewMarker1() { printf("NewMarker1 \n"); printf("NewMarker1 \n"); } llvm2cpp -f -gen-function -funcname=makeNewMarker1 -for=NewMarker1 test.bc -o substitute_bug. test.cpp produces
Sorry for incorrect submit: #include <stdio.h> extern "C" void NewMarker1() { printf("NewMarker1 \n"); printf("NewMarker1 \n"); } llvm2cpp -f -gen-function -funcname=makeNewMarker1 -for=NewMarker1 test.bc -o test.bc.cpp produces twice a same function in the resulting code.
Fixed with this patch: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070611/050541.html