[cfe-dev] TargetInfo::CreateTargetInfo() takes owneship by reference

Mehdi AMINI mehdi.amini at silkan.com
Fri Nov 9 16:04:45 PST 2012


Hi,

r165943 changed *TargetInfo::CreateTargetInfo() so that it takes 
ownership of TargetOptions &Opts which is passed by reference.

While it seems to me that it is not a good idea to take ownership from a 
reference in general (any guidelines about that in LLVM/Clang?), I feel 
it should be at least clearly stated in the comment before the function.

Best,

Mehdi



More information about the cfe-dev mailing list