Android is an environment and we were comparing the android triple

against the OS rather than the environment. Also update other
uses of OS when we meant environment in the android local code.

NFC intended.

llvm-svn: 338460
This commit is contained in:
Eric Christopher 2018-07-31 23:53:24 +00:00
parent 852e88ad85
commit 83c49e8ed4
1 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ PlatformSP PlatformAndroid::CreateInstance(bool force, const ArchSpec *arch) {
}
if (create) {
switch (triple.getOS()) {
switch (triple.getEnvironment()) {
case llvm::Triple::Android:
break;
@ -103,8 +103,8 @@ PlatformSP PlatformAndroid::CreateInstance(bool force, const ArchSpec *arch) {
// Only accept "unknown" for the OS if the host is android and it
// "unknown" wasn't specified (it was just returned because it was NOT
// specified)
case llvm::Triple::OSType::UnknownOS:
create = !arch->TripleOSWasSpecified();
case llvm::Triple::EnvironmentType::UnknownEnvironment:
create = !arch->TripleEnvironmentWasSpecified();
break;
#endif
default: