[PATCH] Standardize usage of CodeGenModule::getContext().getTargetInfo()

Stephen Lin swlin at post.harvard.edu
Tue Apr 9 14:12:21 PDT 2013

OK, I'll go the other way.

On Tue, Apr 9, 2013 at 4:54 PM, John McCall <rjmccall at apple.com> wrote:
> On Apr 8, 2013, at 9:09 PM, Stephen Lin <swlin at post.harvard.edu> wrote:
>> CodeGenModule::getTarget() is implemented as a trivial call to
>> CodeGenModule::getContext().getTargetInfo(), however, the two are
>> called interchangeably from other functions without any apparent
>> semantic distinction between the two.
>> Since the latter usage is more prevalent and is more fundamental
>> anyway, I've eliminated the former and converted all usages to the
>> latter.
> I'd go the other way, actually:  it's shorter, and we can cache it easily
> if we decide it's important.
>> Also, I've removed CodeGenTypes::getTarget(), since it wasn't
>> being used.
> This seems fine.
> John.

More information about the cfe-commits mailing list