diff options
author | Owen Anderson <resistor@mac.com> | 2015-03-03 05:39:27 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2015-03-03 05:39:27 +0000 |
commit | 7325b91783a7f484e6a58af44a1bd61278a87dd2 (patch) | |
tree | f4f5245da5ed079237e5d27121896a33d886f9a8 /llvm/lib/AsmParser/LLParser.cpp | |
parent | ef04b2b505ad37d622342d3f2651674f81602ea4 (diff) | |
download | bcm5719-llvm-7325b91783a7f484e6a58af44a1bd61278a87dd2.tar.gz bcm5719-llvm-7325b91783a7f484e6a58af44a1bd61278a87dd2.zip |
Cleanup after r230934 per Dave's suggestions.
llvm-svn: 231056
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index de566b6cdfc..925af4e17e1 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -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"); |