mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 13:40:30 +00:00
AsmParser: Don't crash on an ill-formed MDNodeVector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f27500040b
commit
054eb6cba6
@ -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:
|
||||
// !{ ... }
|
||||
|
4
test/Assembler/invalid-mdnode-vector2.ll
Normal file
4
test/Assembler/invalid-mdnode-vector2.ll
Normal file
@ -0,0 +1,4 @@
|
||||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
|
||||
!0 = metadata !{metadata
|
||||
; CHECK: expected '!' here
|
Loading…
Reference in New Issue
Block a user