llvm.org GIT mirror llvm / 7977957
[MS Demangler] Properly demangle anonymous namespaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340237 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 1 year, 28 days ago
2 changed file(s) with 9 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
21642164
21652165 Name *Node = Arena.alloc();
21662166 Node->Str = "`anonymous namespace'";
2167 if (MangledName.consumeFront('@'))
2168 return Node;
2169
2170 Error = true;
2171 return nullptr;
2167 size_t EndPos = MangledName.find('@');
2168 if (EndPos == StringView::npos) {
2169 Error = true;
2170 return nullptr;
2171 }
2172 MangledName = MangledName.substr(EndPos + 1);
2173 return Node;
21722174 }
21732175
21742176 Name *Demangler::demangleLocallyScopedNamePiece(StringView &MangledName) {
227227 ??_V@YAXPEAXAEAVklass@@@Z
228228 ; CHECK: void __cdecl operator delete[](void *, class klass &)
229229
230 ; ?A@?A0x43583946@@3VB@@B
231 class B const `anonymous namespace'::A