build: Updated more dependencies

This commit is contained in:
WerWolv
2024-12-26 14:41:43 +01:00
parent 72d9c5019c
commit f11205bba7
11 changed files with 2595 additions and 1064 deletions

View File

@@ -24,7 +24,8 @@ std::string llvm::demangle(std::string_view MangledName) {
return Result;
if (starts_with(MangledName, '_') &&
nonMicrosoftDemangle(MangledName.substr(1), Result))
nonMicrosoftDemangle(MangledName.substr(1), Result,
/*CanHaveLeadingDot=*/false))
return Result;
if (char *Demangled = microsoftDemangle(MangledName, nullptr, nullptr)) {
@@ -46,10 +47,18 @@ static bool isRustEncoding(std::string_view S) { return starts_with(S, "_R"); }
static bool isDLangEncoding(std::string_view S) { return starts_with(S, "_D"); }
bool llvm::nonMicrosoftDemangle(std::string_view MangledName,
std::string &Result) {
std::string &Result, bool CanHaveLeadingDot,
bool ParseParams) {
char *Demangled = nullptr;
// Do not consider the dot prefix as part of the demangled symbol name.
if (CanHaveLeadingDot && MangledName.size() > 0 && MangledName[0] == '.') {
MangledName.remove_prefix(1);
Result = ".";
}
if (isItaniumEncoding(MangledName))
Demangled = itaniumDemangle(MangledName);
Demangled = itaniumDemangle(MangledName, ParseParams);
else if (isRustEncoding(MangledName))
Demangled = rustDemangle(MangledName);
else if (isDLangEncoding(MangledName))
@@ -58,7 +67,7 @@ bool llvm::nonMicrosoftDemangle(std::string_view MangledName,
if (!Demangled)
return false;
Result = Demangled;
Result += Demangled;
std::free(Demangled);
return true;
}