Skip to content

Commit 8e7ec80

Browse files
QuLogicaykevl
authored andcommitted
TST: Skip uwtable in LLVM 15+
1 parent 0f8cf46 commit 8e7ec80

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ir_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
package llvm
1414

1515
import (
16+
"strconv"
1617
"strings"
1718
"testing"
1819
)
@@ -89,6 +90,15 @@ func TestAttributes(t *testing.T) {
8990
}
9091

9192
for _, name := range attrTests {
93+
majorVersion, err := strconv.Atoi(strings.SplitN(Version, ".", 2)[0])
94+
if err != nil {
95+
// sanity check, should be unreachable
96+
t.Errorf("could not parse LLVM version: %v", err)
97+
}
98+
if majorVersion >= 15 && name == "uwtable" {
99+
// This changed from an EnumAttr to an IntAttr in LLVM 15, and testAttribute doesn't work on such attributes.
100+
continue
101+
}
92102
testAttribute(t, name)
93103
}
94104
}

0 commit comments

Comments
 (0)