Index: include/llvm/ADT/Triple.h =================================================================== --- include/llvm/ADT/Triple.h +++ include/llvm/ADT/Triple.h @@ -145,7 +145,8 @@ AMD, Mesa, SUSE, - LastVendorType = SUSE + OpenEmbedded, + LastVendorType = OpenEmbedded }; enum OSType { UnknownOS, Index: lib/Support/Triple.cpp =================================================================== --- lib/Support/Triple.cpp +++ lib/Support/Triple.cpp @@ -168,6 +168,7 @@ case AMD: return "amd"; case Mesa: return "mesa"; case SUSE: return "suse"; + case OpenEmbedded: return "oe"; } llvm_unreachable("Invalid VendorType!"); @@ -463,6 +464,7 @@ .Case("amd", Triple::AMD) .Case("mesa", Triple::Mesa) .Case("suse", Triple::SUSE) + .Case("oe", Triple::OpenEmbedded) .Default(Triple::UnknownVendor); } Index: unittests/ADT/TripleTest.cpp =================================================================== --- unittests/ADT/TripleTest.cpp +++ unittests/ADT/TripleTest.cpp @@ -361,6 +361,12 @@ EXPECT_EQ(Triple::Linux, T.getOS()); EXPECT_EQ(Triple::GNUABI64, T.getEnvironment()); + T = Triple("arm-oe-linux-gnueabi"); + EXPECT_EQ(Triple::arm, T.getArch()); + EXPECT_EQ(Triple::OpenEmbedded, T.getVendor()); + EXPECT_EQ(Triple::Linux, T.getOS()); + EXPECT_EQ(Triple::GNUEABI, T.getEnvironment()); + T = Triple("huh"); EXPECT_EQ(Triple::UnknownArch, T.getArch()); }