mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 16:31:33 +00:00
turn an assert into a proper check, fixing crash on invalid here:
$ llvm-as t.ll llvm-as: t.ll:1:6: error: expected 'type' after '=' %0 = = type { i32, float, float, double } ^ PR6810. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
47e476609b
commit
f7240de877
@ -322,9 +322,8 @@ bool LLParser::ParseUnnamedType() {
|
||||
return true;
|
||||
}
|
||||
|
||||
assert(Lex.getKind() == lltok::kw_type);
|
||||
LocTy TypeLoc = Lex.getLoc();
|
||||
Lex.Lex(); // eat kw_type
|
||||
if (ParseToken(lltok::kw_type, "expected 'type' after '='")) return true;
|
||||
|
||||
PATypeHolder Ty(Type::getVoidTy(Context));
|
||||
if (ParseType(Ty)) return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user