diff options
author | Renato Golin <renato.golin@linaro.org> | 2015-05-22 18:17:55 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2015-05-22 18:17:55 +0000 |
commit | 84b1a805bbccf75da3dab605d291e92e1cba5acc (patch) | |
tree | b849cc68689f0f69c649ad271b73ab2deedbe177 /unittests/ADT/TripleTest.cpp | |
parent | 57cc146595222b8db7ae73df9ccebd1d7c149132 (diff) |
Adding profile and version parsers to ARMTargetParser
This allows us to match armv6m to default to thumb, but will also be used by
Clang's driver and remove the current incomplete copy in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ADT/TripleTest.cpp')
-rw-r--r-- | unittests/ADT/TripleTest.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp index 4af3bfe9489..b0f01b26e72 100644 --- a/unittests/ADT/TripleTest.cpp +++ b/unittests/ADT/TripleTest.cpp @@ -900,6 +900,14 @@ TEST(TripleTest, ParseARMArch) { Triple T = Triple("armv5eb"); EXPECT_EQ(Triple::armeb, T.getArch()); } + { + Triple T = Triple("armebv7m"); + EXPECT_EQ(Triple::armeb, T.getArch()); + } + { + Triple T = Triple("armv7eb"); + EXPECT_EQ(Triple::armeb, T.getArch()); + } // THUMB { Triple T = Triple("thumb"); @@ -918,9 +926,21 @@ TEST(TripleTest, ParseARMArch) { EXPECT_EQ(Triple::thumbeb, T.getArch()); } { + Triple T = Triple("thumbebv7"); + EXPECT_EQ(Triple::thumbeb, T.getArch()); + } + { + Triple T = Triple("armv6m"); + EXPECT_EQ(Triple::thumb, T.getArch()); + } + { Triple T = Triple("thumbv2"); EXPECT_EQ(Triple::UnknownArch, T.getArch()); } + { + Triple T = Triple("thumbebv6eb"); + EXPECT_EQ(Triple::UnknownArch, T.getArch()); + } // AARCH64 { Triple T = Triple("arm64"); |