|
10 | 10 |
|
11 | 11 |
|
12 | 12 | class AbiTagStructorsTestCase(TestBase):
|
| 13 | + @skipIf( |
| 14 | + compiler="clang", |
| 15 | + compiler_version=["<", "22"], |
| 16 | + bugnumber="Required Clang flag not supported", |
| 17 | + ) |
13 | 18 | @expectedFailureAll(oslist=["windows"])
|
14 | 19 | def test_with_structor_linkage_names(self):
|
15 | 20 | self.build(dictionary={"CXXFLAGS_EXTRAS": "-gstructor-decl-linkage-names"})
|
@@ -73,7 +78,16 @@ def test_no_structor_linkage_names(self):
|
73 | 78 | Test that without linkage names on structor declarations we can't call
|
74 | 79 | ABI-tagged structors.
|
75 | 80 | """
|
76 |
| - self.build(dictionary={"CXXFLAGS_EXTRAS": "-gno-structor-decl-linkage-names"}) |
| 81 | + # In older versions of Clang the -gno-structor-decl-linkage-names |
| 82 | + # behaviour was the default. |
| 83 | + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion( |
| 84 | + [">=", "22.0"] |
| 85 | + ): |
| 86 | + self.build( |
| 87 | + dictionary={"CXXFLAGS_EXTRAS": "-gno-structor-decl-linkage-names"} |
| 88 | + ) |
| 89 | + else: |
| 90 | + self.build() |
77 | 91 |
|
78 | 92 | lldbutil.run_to_source_breakpoint(
|
79 | 93 | self, "Break here", lldb.SBFileSpec("main.cpp", False)
|
@@ -105,12 +119,23 @@ def do_nested_structor_test(self):
|
105 | 119 | "expression TaggedLocal()", error=True, substrs=["Couldn't look up symbols"]
|
106 | 120 | )
|
107 | 121 |
|
| 122 | + @skipIf(compiler="clang", compiler_version=["<", "22"]) |
108 | 123 | @expectedFailureAll(oslist=["windows"])
|
109 |
| - def test_nested_no_structor_linkage_names(self): |
| 124 | + def test_nested_with_structor_linkage_names(self): |
110 | 125 | self.build(dictionary={"CXXFLAGS_EXTRAS": "-gstructor-decl-linkage-names"})
|
111 | 126 | self.do_nested_structor_test()
|
112 | 127 |
|
113 | 128 | @expectedFailureAll(oslist=["windows"])
|
114 |
| - def test_nested_with_structor_linkage_names(self): |
115 |
| - self.build(dictionary={"CXXFLAGS_EXTRAS": "-gno-structor-decl-linkage-names"}) |
| 129 | + def test_nested_no_structor_linkage_names(self): |
| 130 | + # In older versions of Clang the -gno-structor-decl-linkage-names |
| 131 | + # behaviour was the default. |
| 132 | + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion( |
| 133 | + [">=", "22.0"] |
| 134 | + ): |
| 135 | + self.build( |
| 136 | + dictionary={"CXXFLAGS_EXTRAS": "-gno-structor-decl-linkage-names"} |
| 137 | + ) |
| 138 | + else: |
| 139 | + self.build() |
| 140 | + |
116 | 141 | self.do_nested_structor_test()
|
0 commit comments