[llvm] r235520 - [opaque pointer type] Use pointee type retrieved from asm, rather than accessing it via the pointer type
David Blaikie
dblaikie at gmail.com
Wed Apr 22 09:37:35 PDT 2015
Author: dblaikie
Date: Wed Apr 22 11:37:35 2015
New Revision: 235520
URL: http://llvm.org/viewvc/llvm-project?rev=235520&view=rev
Log:
[opaque pointer type] Use pointee type retrieved from asm, rather than accessing it via the pointer type
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=235520&r1=235519&r2=235520&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Wed Apr 22 11:37:35 2015
@@ -2849,8 +2849,7 @@ bool LLParser::ParseValID(ValID &ID, Per
}
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))
More information about the llvm-commits
mailing list