mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
llvm-undname: Don't crash on incomplete enum tag manglings
Found by inspection. llvm-svn: 358238
This commit is contained in:
parent
f882334690
commit
e97d558ce9
@ -1907,7 +1907,7 @@ TagTypeNode *Demangler::demangleClassType(StringView &MangledName) {
|
||||
TT = Arena.alloc<TagTypeNode>(TagKind::Class);
|
||||
break;
|
||||
case 'W':
|
||||
if (MangledName.popFront() != '4') {
|
||||
if (!MangledName.consumeFront('4')) {
|
||||
Error = true;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -104,3 +104,8 @@
|
||||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: ??C@$
|
||||
; CHECK-NEXT: error: Invalid mangled name
|
||||
|
||||
?x@@3PAW
|
||||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: ?x@@3PAW
|
||||
; CHECK-NEXT: error: Invalid mangled name
|
||||
|
Loading…
Reference in New Issue
Block a user