mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Cleanup after r230934 per Dave's suggestions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc2c7a558b
commit
25dc6c8a08
@ -5460,11 +5460,12 @@ int LLParser::ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS) {
|
||||
return true;
|
||||
|
||||
Type *PtrTy = Ptr->getType();
|
||||
if (!isa<SequentialType>(PtrTy))
|
||||
return Error(Loc, "pointer type is not valid");
|
||||
if (VectorType *VT = dyn_cast<VectorType>(PtrTy))
|
||||
PtrTy = VT->getElementType();
|
||||
if (Ty != cast<SequentialType>(PtrTy)->getElementType())
|
||||
SequentialType *SeqPtrTy = dyn_cast<SequentialType>(PtrTy);
|
||||
if (!SeqPtrTy)
|
||||
return Error(Loc, "pointer type is not valid");
|
||||
if (Ty != SeqPtrTy->getElementType())
|
||||
return Error(ExplicitTypeLoc,
|
||||
"explicit pointee type doesn't match operand's pointee type");
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
; RUN: not llvm-as < %s >/dev/null 2> %t
|
||||
; RUN: FileCheck %s < %t
|
||||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
||||
; Test the case of an invalid pointer type on a GEP
|
||||
|
||||
; CHECK: pointer type is not valid
|
||||
|
Loading…
Reference in New Issue
Block a user