r197832 - Move the TargetMachine instance into EmitAssemblyHelper
Alp Toker
alp at nuanti.com
Fri Dec 20 13:24:34 PST 2013
On 20/12/2013 21:05, Rafael EspĂndola wrote:
>> - 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?
I'm happy with !TM. It documents that the TM instance is lazily created
and reusable should anyone want to do so in future. Unless you know a
case where this doesn't hold true?
Alp.
>
> Cheers,
> Rafael
--
http://www.nuanti.com
the browser experts
More information about the cfe-commits
mailing list