mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-04 22:28:27 +00:00
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
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user