Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(demangle): Import libswift demangle 6.0.3 #885

Merged
merged 8 commits into from
Jan 9, 2025
Merged

Conversation

Dav1dde
Copy link
Member

@Dav1dde Dav1dde commented Jan 9, 2025

Fixes: #884, #873

  • Updates vendored swift sources to 6.0.3 (latest release as of today).
  • Adds a new necessary include dir to the update script
  • Updates the included patch
  • Updates the build script. Now requires C++17, disables changes-meaning warning which causes compilation failures on recent GCCs (fine on clang). Demangle entrypoint is now guarded by SWIFT_STDLIB_HAS_TYPE_PRINTING.

This did need some manual patch-up of the NodePrinter.cpp which uses endswith instead of ends_with. I suspect this is because the llvm sources checked out are newer than 6.0.3 was intended to be built with, at that point endswith was still available (but deprecated).

I manually had to add the InvertibleProtocols.def header file, the update script did not automatically discover it. On a quick glance I couldn't see why not, this is something to look into in a follow-up or just keep it as a manual step.

One of the test cases now has a different demangling, all the others still pass, I updated it:

// Swift 5.5.1
-        "$s10Speediness17NetworkQualityCLIO3run10sequentialAC6ResultVSb_tYaKFZTf4nd_nTQ0_" => "(1) await resume partial function for specialized static NetworkQualityCLI.run",
+        "$s10Speediness17NetworkQualityCLIO3run10sequentialAC6ResultVSb_tYaKFZTf4nd_nTQ0_" => "specialized static NetworkQualityCLI.run",

@Dav1dde Dav1dde requested a review from a team January 9, 2025 10:22
@Dav1dde Dav1dde self-assigned this Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 1712830

@Dav1dde Dav1dde merged commit c18e618 into master Jan 9, 2025
15 checks passed
@Dav1dde Dav1dde deleted the dav1d/swift-603 branch January 9, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Swift symbols not demangled
3 participants