Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class SwiftLanguageRuntime : public LanguageRuntime {

void ModulesDidLoad(const ModuleList &module_list) override;

bool IsSymbolARuntimeThunk(const Symbol &symbol) override;

/// Mangling support.
/// \{
/// Use these passthrough functions rather than calling into Swift directly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,15 @@ static lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread,
return new_thread_plan_sp;
}

bool SwiftLanguageRuntime::IsSymbolARuntimeThunk(const Symbol &symbol) {
llvm::StringRef symbol_name =
symbol.GetMangled().GetMangledName().GetStringRef();
if (symbol_name.empty())
return false;
swift::Demangle::Context demangle_ctx;
return demangle_ctx.isThunkSymbol(symbol_name);
}

bool SwiftLanguageRuntime::IsSwiftMangledName(llvm::StringRef name) {
return swift::Demangle::isSwiftSymbol(name);
}
Expand Down