MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / DemangleNameLLVM

Method DemangleNameLLVM

plugins/rtti/rtti.cpp:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70
71std::optional<std::string> RTTI::DemangleNameLLVM(bool allowMangled, const std::string &mangledName)
72{
73 QualifiedName demangledName = {};
74 Ref<Type> outType = {};
75 if (!DemangleLLVM(mangledName, demangledName, true))
76 return allowMangled ? std::optional(mangledName) : std::nullopt;
77 auto demangledNameStr = demangledName.GetString();
78 size_t beginFind = demangledNameStr.find_first_of(' ');
79 if (beginFind != std::string::npos)
80 demangledNameStr.erase(0, beginFind + 1);
81 size_t endFind = demangledNameStr.find(" `RTTI Type Descriptor Name'");
82 if (endFind != std::string::npos)
83 demangledNameStr.erase(endFind, demangledNameStr.length());
84 return demangledNameStr;
85}
86
87
88Ref<Metadata> BaseClassInfo::SerializedMetadata() const

Callers

nothing calls this directly

Calls 5

DemangleLLVMFunction · 0.85
eraseMethod · 0.80
findMethod · 0.80
GetStringMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected