case MSVC: return "msvc";
case Itanium: return "itanium";
case Cygnus: return "cygnus";
+ case AMDOpenCL: return "amdopencl";
}
llvm_unreachable("Invalid EnvironmentType!");
.StartsWith("msvc", Triple::MSVC)
.StartsWith("itanium", Triple::Itanium)
.StartsWith("cygnus", Triple::Cygnus)
+ .StartsWith("amdopencl", Triple::AMDOpenCL)
.Default(Triple::UnknownEnvironment);
}
EXPECT_EQ(Triple::Darwin, T.getOS());
EXPECT_EQ("i386-pc-darwin", T.getTriple());
+ T.setEnvironmentName("amdopencl");
+ EXPECT_EQ(Triple::AMDOpenCL, T.getEnvironment());
}
TEST(TripleTest, BitWidthPredicates) {