From c5615c232685dd9e94003781f8fb31f96f141231 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 3 Apr 2019 23:29:05 +0000 Subject: [PATCH] llvm-undname: Name a pair. No behavior change. Differential Revision: https://reviews.llvm.org/D60210 llvm-svn: 357653 --- llvm/lib/Demangle/MicrosoftDemangle.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Demangle/MicrosoftDemangle.cpp b/llvm/lib/Demangle/MicrosoftDemangle.cpp index 49fa7324ef99..0704f7bac51b 100644 --- a/llvm/lib/Demangle/MicrosoftDemangle.cpp +++ b/llvm/lib/Demangle/MicrosoftDemangle.cpp @@ -1327,8 +1327,10 @@ Demangler::demangleLocallyScopedNamePiece(StringView &MangledName) { NamedIdentifierNode *Identifier = Arena.alloc(); MangledName.consumeFront('?'); - auto Number = demangleNumber(MangledName); - assert(!Number.second); + uint64_t Number = 0; + bool IsNegative = false; + std::tie(Number, IsNegative) = demangleNumber(MangledName); + assert(!IsNegative); // One ? to terminate the number MangledName.consumeFront('?'); @@ -1346,7 +1348,7 @@ Demangler::demangleLocallyScopedNamePiece(StringView &MangledName) { OS << '`'; Scope->output(OS, OF_Default); OS << '\''; - OS << "::`" << Number.first << "'"; + OS << "::`" << Number << "'"; OS << '\0'; char *Result = OS.getBuffer(); Identifier->Name = copyString(Result);