Skip to content

Commit c87bfcc

Browse files
committed
fix: fix error in NativeAPI
1 parent b8eb7d4 commit c87bfcc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/legacy/api/NativeAPI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ NativeFunction NativeFunction::getOrParse(const std::string& symbol) {
273273
result.mFunction = ll::memory::resolveSymbol(symbol.c_str());
274274
result.mSymbol = symbol;
275275

276-
Demangler demangler;
277-
StringView symbolView{symbol.c_str()};
278-
SymbolNode* AST = demangler.parse(symbolView);
276+
Demangler demangler;
277+
std::string_view symbolView{symbol};
278+
SymbolNode* AST = demangler.parse(symbolView);
279279
if (demangler.Error) throw std::runtime_error("failed to demangle symbol");
280280
if (AST->kind() != NodeKind::FunctionSymbol) throw std::runtime_error("mangled name is not a function");
281281
auto funcAST = static_cast<FunctionSymbolNode*>(AST);

0 commit comments

Comments
 (0)