> - TargetMachine *TM = CreateTargetMachine(UsesCodeGen); > + if (!TM) > + TM.reset(CreateTargetMachine(UsesCodeGen)); > + Just a nit I noticed now: this could be "assert(!TM);" instead of if(!TM), no? Cheers, Rafael