Silence duplicate symbol runtime warning (#5068)

Similar to #4901 but updated with a new warning from Xcode 15 beta 1.
Increase dupclass max name length from 64 to 128
This commit is contained in:
JP Simard
2023-06-22 10:14:54 -04:00
committed by GitHub
parent 0693d547b0
commit b69ae7cc4d
3 changed files with 8 additions and 1 deletions
+6
View File
@@ -76,6 +76,12 @@
[woxtu](https://github.com/woxtu)
[#3023](https://github.com/realm/SwiftLint/issues/3023)
* Work around dyld warning about duplicate SwiftSyntax classes with Xcode 15
betas.
[keith](https://github.com/keith)
[JP Simard](https://github.com/jpsim)
[#4782](https://github.com/realm/SwiftLint/issues/4782)
## 0.52.2: Crisper Clearer Pleats
#### Breaking
@@ -11,5 +11,6 @@ OBJC_DUPCLASS(_TtC11SwiftSyntax18ParsingSyntaxArena);
OBJC_DUPCLASS(_TtC11SwiftSyntax23SourceLocationConverter);
OBJC_DUPCLASS(_TtC11SwiftSyntax26IncrementalParseTransition);
OBJC_DUPCLASS(_TtC11SwiftSyntax35IncrementalParseReusedNodeCollector);
OBJC_DUPCLASS(_TtC11SwiftParserP33_78149DB072C20084E7D780D86E26C3AF41StringLiteralExpressionIndentationChecker);
#endif // __APPLE__
@@ -11,7 +11,7 @@
// Struct layout from https://github.com/apple-oss-distributions/objc4/blob/8701d5672d3fd3cd817aeb84db1077aafe1a1604/runtime/objc-abi.h#L175-L183
#define OBJC_DUPCLASS(kclass) \
__attribute__((used)) __attribute__((visibility("hidden"))) \
static struct { uint32_t version; uint32_t flags; const char name[64]; } \
static struct { uint32_t version; uint32_t flags; const char name[128]; } \
const __duplicate_class_##kclass = { 0, 0, #kclass }; \
\
__attribute__((used)) __attribute__((visibility("hidden"))) \