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): Update swift demangler to 5.3 #282

Merged
merged 3 commits into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions symbolic-demangle/vendor/swift/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swift-source
24 changes: 12 additions & 12 deletions symbolic-demangle/vendor/swift/1-arguments.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
commit 575a6035e76e73eacc99d43a412d0afa2068dd25
Author: Jan Michael Auer <mail@jauer.org>
Date: Sun Apr 5 16:39:15 2020 +0200
commit af26ebbf5f3bb03c92739b19127f5c2c5b402e4a
Author: Arpad Borsos <arpad.borsos@sentry.io>
Date: Mon Oct 19 13:28:23 2020 +0200

feat(demangle): Add option to skip Swift function parameters

diff --git a/demangle/vendor/swift/include/swift/Demangling/Demangle.h b/demangle/vendor/swift/include/swift/Demangling/Demangle.h
index 2a8fd6c..c377a00 100644
--- a/demangle/vendor/swift/include/swift/Demangling/Demangle.h
+++ b/demangle/vendor/swift/include/swift/Demangling/Demangle.h
diff --git a/symbolic-demangle/vendor/swift/include/swift/Demangling/Demangle.h b/symbolic-demangle/vendor/swift/include/swift/Demangling/Demangle.h
index ce3a4b5..df88a9c 100644
--- a/symbolic-demangle/vendor/swift/include/swift/Demangling/Demangle.h
+++ b/symbolic-demangle/vendor/swift/include/swift/Demangling/Demangle.h
@@ -57,6 +57,7 @@ struct DemangleOptions {
bool ShortenArchetype = false;
bool ShowPrivateDiscriminators = true;
Expand All @@ -16,11 +16,11 @@ index 2a8fd6c..c377a00 100644
std::function<std::string(uint64_t, uint64_t)> GenericParameterName =
genericParameterName;

diff --git a/demangle/vendor/swift/lib/Demangling/NodePrinter.cpp b/demangle/vendor/swift/lib/Demangling/NodePrinter.cpp
index 097be7f..266506e 100644
--- a/demangle/vendor/swift/lib/Demangling/NodePrinter.cpp
+++ b/demangle/vendor/swift/lib/Demangling/NodePrinter.cpp
@@ -728,6 +728,11 @@ private:
diff --git a/symbolic-demangle/vendor/swift/lib/Demangling/NodePrinter.cpp b/symbolic-demangle/vendor/swift/lib/Demangling/NodePrinter.cpp
index 1e39291..0784608 100644
--- a/symbolic-demangle/vendor/swift/lib/Demangling/NodePrinter.cpp
+++ b/symbolic-demangle/vendor/swift/lib/Demangling/NodePrinter.cpp
@@ -738,6 +738,11 @@ private:
setInvalid();
return;
}
Expand Down
10 changes: 5 additions & 5 deletions symbolic-demangle/vendor/swift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This folder contains a vendored subset of the [Swift Programming Language]. The Swift library is
reduced to the demangler only to reduce the size of this package.

The current version is **Swift 5.2.1**.
The current version is **Swift 5.3**.

## Sentry Modifications

Expand All @@ -23,11 +23,11 @@ patch is maintained in `1-arguments.patch`.
```
3. Check out dependencies:
```
$ ./swift/utils/update-checkout --clone-with-ssh
$ ./swift/utils/update-checkout --clone
```
4. Check out the release banch of the latest release:
4. Check out the release branch of the latest release:
```
$ git checkout swift-5.2.1-RELEASE
$ git checkout swift-5.3-RELEASE
```
5. Build the complete swift project (be very patient, this may take long):
```
Expand All @@ -37,7 +37,7 @@ patch is maintained in `1-arguments.patch`.
2. **Copy updated sources and headers from the checkout to this library:**
1. Run the update script in this directory (requires Python 3):
```
$ ./update.py <path-to-swift-workspace>
$ ./update.py swift-source
```
2. Check for modifications.
3. Commit _"feat(demangle): Import libswift demangle x.x.x"_ before proceeding.
Expand Down
90 changes: 0 additions & 90 deletions symbolic-demangle/vendor/swift/include/llvm-c/DataTypes.h

This file was deleted.

2 changes: 1 addition & 1 deletion symbolic-demangle/vendor/swift/include/llvm/ADT/Optional.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ template <typename T> class Optional {

/// Apply a function to the value if present; otherwise return None.
template <class Function>
auto map(const Function &F) const
auto map(const Function &F) const LLVM_LVALUE_FUNCTION
-> Optional<decltype(F(getValue()))> {
if (*this) return F(getValue());
return None;
Expand Down
Loading