#!/bin/sh echo "test program: " $1 llvm-gcc -I ./ -emit-llvm -c -g $1.c -o $1.bc opt -load LLVMCLAPBB.dylib -clapmbb $1.bc -o $1_instrumented.bc llc $1_instrumented.bc -o $1_instrumented.s llvm-gcc -pthread dummy.dylib $1_instrumented.s -o $1_instrumented DYLD_FORCE_FLAT_NAMESPACE= DYLD_INSERT_LIBRARIES=libsyncr.dylib ./$1_instrumented