From: David Blaikie Date: Wed, 22 Apr 2015 16:37:35 +0000 (+0000) Subject: [opaque pointer type] Use pointee type retrieved from asm, rather than accessing... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1436ff81cc7d24b977a59847f5a6622c7450f902;p=oota-llvm.git [opaque pointer type] Use pointee type retrieved from asm, rather than accessing it via the pointer type git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235520 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 2e8008b96e7..64bf7cdc919 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2849,8 +2849,7 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) { } SmallPtrSet Visited; - if (!Indices.empty() && - !BasePointerType->getElementType()->isSized(&Visited)) + if (!Indices.empty() && !Ty->isSized(&Visited)) return Error(ID.Loc, "base element of getelementptr must be sized"); if (!GetElementPtrInst::getIndexedType(Ty, Indices))