aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/TripleTest.cpp
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
commit2d27b0f0ed36f8e76923c2a2b87950cce5fc433f (patch)
tree8bafedb902a7d44e9959482a48bf1216ebab10fa /llvm/unittests/ADT/TripleTest.cpp
parent228063cd21c4e13aba0ef7a4522b1f32e3116c18 (diff)
downloadllvm-2d27b0f0ed36f8e76923c2a2b87950cce5fc433f.zip
llvm-2d27b0f0ed36f8e76923c2a2b87950cce5fc433f.tar.gz
llvm-2d27b0f0ed36f8e76923c2a2b87950cce5fc433f.tar.bz2
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. llvm-svn: 151024
Diffstat (limited to 'llvm/unittests/ADT/TripleTest.cpp')
-rw-r--r--llvm/unittests/ADT/TripleTest.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/unittests/ADT/TripleTest.cpp b/llvm/unittests/ADT/TripleTest.cpp
index b95107d..5fe9afd 100644
--- a/llvm/unittests/ADT/TripleTest.cpp
+++ b/llvm/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());