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

John McCall rjmccall at apple.com
Tue Apr 9 13:54:45 PDT 2013


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