From 80201094d494278493e2e08f6adc7c2b4c5b0ad6 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 24 Apr 2024 18:33:11 -0400 Subject: Expose LLVM demangler --- binaryninjaapi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 5ec190b2..9d4a3ae6 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -1531,6 +1531,26 @@ namespace BinaryNinja { std::function progress = {}, Ref options = new Metadata(MetadataType::KeyValueDataType), bool isDatabase = false); + /*! Demangles using LLVM's demangler + + \param[in] mangledName a mangled (msvc/itanium/rust/dlang) name + \param[out] outVarName QualifiedName reference to write the output name to. + \param[in] simplify Whether to simplify demangled names. + + \ingroup demangle + */ + bool DemangleLLVM(const std::string& mangledName, QualifiedName& outVarName, const bool simplify = false); + + /*! Demangles using LLVM's demangler + + \param[in] mangledName a mangled (msvc/itanium/rust/dlang) name + \param[out] outVarName QualifiedName reference to write the output name to. + \param[in] view View to check the analysis.types.templateSimplifier for + + \ingroup demangle + */ + bool DemangleLLVM(const std::string& mangledName, QualifiedName& outVarName, BinaryView* view); + /*! Demangles a Microsoft Visual Studio C++ name \param[in] arch Architecture for the symbol. Required for pointer and integer sizes. -- cgit v1.3.1