This is an archive of the discontinued LLVM Phabricator instance.

Add Triple::isAndroid().
ClosedPublic

Authored by eugenis on Oct 8 2015, 1:35 PM.

Details

Summary

This is a simple refactoring that replaces Triple.getEnvironment()
checks for Android with Triple.isAndroid().

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis updated this revision to Diff 36892.Oct 8 2015, 1:35 PM
eugenis retitled this revision from to Add Triple::isAndroid()..
eugenis updated this object.
eugenis added a reviewer: echristo.
eugenis set the repository for this revision to rL LLVM.
eugenis added a subscriber: llvm-commits.

LGTM. Thanks for adding this. I know that it will make a lot of other folks happy within Android too, that this will be more easily accessible.

danalbert accepted this revision.Oct 8 2015, 1:56 PM
danalbert added a reviewer: danalbert.
This revision is now accepted and ready to land.Oct 8 2015, 1:56 PM
echristo edited edge metadata.Oct 8 2015, 1:56 PM
echristo added a subscriber: echristo.

Only minor bike shedding:

isEnvAndroid/isEnvironmentAndroid rather than just isAndroid to match the
rest of the naming scheme?

Otherwise LGTM.

-eric

echristo accepted this revision.Oct 8 2015, 1:56 PM
echristo edited edge metadata.

I'd prefer isAndroid because the fact that "-android" is environment is more of an implementation detail, and Android is more of OS (but calling the function isOSAndroid would be wrong of course).
There are precedents: isMacOSX, isiOS, isPS4.

OK. LGTM then.

Thanks!

eugenis closed this revision.Oct 8 2015, 2:24 PM

r249750