forked from OSchip/llvm-project
AsmParser: Don't crash on an ill-formed MDNodeVector
llvm-svn: 224056
This commit is contained in:
parent
54cc3c2f23
commit
0a14c0ec9d
|
@ -2968,8 +2968,8 @@ bool LLParser::ParseMetadataAsValue(ValID &ID, PerFunctionState *PFS) {
|
|||
/// ::= !{...}
|
||||
/// ::= !"string"
|
||||
bool LLParser::ParseMetadata(Metadata *&MD, PerFunctionState *PFS) {
|
||||
assert(Lex.getKind() == lltok::exclaim);
|
||||
Lex.Lex();
|
||||
if (ParseToken(lltok::exclaim, "expected '!' here"))
|
||||
return true;
|
||||
|
||||
// MDNode:
|
||||
// !{ ... }
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
|
||||
!0 = metadata !{metadata
|
||||
; CHECK: expected '!' here
|
Loading…
Reference in New Issue