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

Removes internal files used for swift demangling and replaces with package dependency on swift-demangling #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.build/
build/*
KSCrash/build/*
*.pbxuser
Expand Down
14 changes: 14 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "swift-demangler",
"kind" : "remoteSourceControl",
"location" : "https://github.com/embrace-io/swift-demangler.git",
"state" : {
"branch" : "main",
"revision" : "602376930d19d1f21ef6501dceede8b1143ab9f9"
}
}
],
"version" : 2
}
23 changes: 9 additions & 14 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.1
// swift-tools-version:5.7

import PackageDescription

Expand All @@ -15,12 +15,15 @@ let package = Package(
"KSCrash/Reporting/Filters",
"KSCrash/Reporting/Filters/Tools",
"KSCrash/Reporting/Tools",
"KSCrash/Reporting/Sinks",
"KSCrash/swift/Basic"
"KSCrash/Reporting/Sinks"
]
)
],
dependencies: [
.package(
url: "https://github.com/embrace-io/swift-demangler.git",
branch: "main"
),
],
targets: [
.target(
Expand Down Expand Up @@ -63,6 +66,9 @@ let package = Package(
),
.target(
name: "KSCrash/Recording/Tools",
dependencies: [
.product(name: "AppleSwiftDemangling", package: "swift-demangler")
],
path: "Source/KSCrash/Recording/Tools",
publicHeadersPath: ".",
cxxSettings: [
Expand Down Expand Up @@ -117,17 +123,6 @@ let package = Package(
.headerSearchPath("../../Recording/Tools"),
.headerSearchPath("../../Recording/Monitors")
]
),
.target(
name: "KSCrash/swift/Basic",
path: "Source/KSCrash/swift/Basic",
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath(".."),
.headerSearchPath("../../llvm/ADT"),
.headerSearchPath("../../llvm/Config"),
.headerSearchPath("../../llvm/Support")
]
)
],
cxxLanguageStandard: .gnucxx11
Expand Down
10 changes: 2 additions & 8 deletions Source/KSCrash/Recording/Tools/KSDemangle_Swift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,10 @@
//


#include "Demangle.h"
#include "KSDemangle_Swift.h"
#include "DemangleService.h"

extern "C" char* ksdm_demangleSwift(const char* mangledSymbol)
{
swift::Demangle::DemangleOptions options = swift::Demangle::DemangleOptions::SimplifiedUIDemangleOptions();
std::string demangled = swift::Demangle::demangleSymbolAsString(mangledSymbol, options);
if(demangled.length() == 0)
{
return NULL;
}
return strdup(demangled.c_str());
return demangleSymbol(mangledSymbol);
}
195 changes: 0 additions & 195 deletions Source/KSCrash/swift/Basic/Context.cpp

This file was deleted.

71 changes: 0 additions & 71 deletions Source/KSCrash/swift/Basic/Demangle.cpp

This file was deleted.

Loading