summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-02-21 03:39:36 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-02-21 03:39:36 +0000
commit124e51c0d2b521b0fb3aaaf2443403cd451b7857 (patch)
treee698a2f26a96b4e06e1c43c5161f782f97d933ec /unittests
parent4b04578d65e38cdb5077de2498889e4a174ccdfd (diff)
Switch the llvm::Triple class to immediately parse the triple string on
construction. Simplify its interface, implementation, and users accordingly as there is no longer an 'uninitialized' state to check for. Also, fixes a bug lurking in the interface as there was one method that didn't correctly check for initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ADT/TripleTest.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp
index b95107d6c0..5fe9afd607 100644
--- a/unittests/ADT/TripleTest.cpp
+++ b/unittests/ADT/TripleTest.cpp
@@ -154,7 +154,7 @@ TEST(TripleTest, Normalization) {
// Check that normalizing a permutated set of valid components returns a
// triple with the unpermuted components.
StringRef C[4];
- for (int Arch = 1+Triple::UnknownArch; Arch < Triple::InvalidArch; ++Arch) {
+ for (int Arch = 1+Triple::UnknownArch; Arch <= Triple::amdil; ++Arch) {
C[0] = Triple::getArchTypeName(Triple::ArchType(Arch));
for (int Vendor = 1+Triple::UnknownVendor; Vendor <= Triple::PC;
++Vendor) {
@@ -273,11 +273,6 @@ TEST(TripleTest, BitWidthPredicates) {
EXPECT_FALSE(T.isArch32Bit());
EXPECT_FALSE(T.isArch64Bit());
- T.setArch(Triple::InvalidArch);
- EXPECT_FALSE(T.isArch16Bit());
- EXPECT_FALSE(T.isArch32Bit());
- EXPECT_FALSE(T.isArch64Bit());
-
T.setArch(Triple::arm);
EXPECT_FALSE(T.isArch16Bit());
EXPECT_TRUE(T.isArch32Bit());