[opaque pointer type] Use pointee type retrieved from asm, rather than accessing...
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 22 Apr 2015 16:37:35 +0000 (16:37 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 22 Apr 2015 16:37:35 +0000 (16:37 +0000)
llvm-svn: 235520

llvm/lib/AsmParser/LLParser.cpp

index 2e8008b..64bf7cd 100644 (file)
@@ -2849,8 +2849,7 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
       }
 
       SmallPtrSet<const Type*, 4> 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))