From 8f27ae46b83cfa8a97a1532d49d6097889410ea4 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 13 May 2015 22:55:01 +0000 Subject: [PATCH] [opaque pointer type] Use the value type of the GlobalVariable rather than accessing it through the pointee's type llvm-svn: 237312 --- llvm/lib/AsmParser/LLParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 398292c..ef464c3 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -776,7 +776,7 @@ bool LLParser::ParseGlobal(const std::string &Name, LocTy NameLoc, Name, nullptr, GlobalVariable::NotThreadLocal, AddrSpace); } else { - if (GVal->getType()->getElementType() != Ty) + if (GVal->getValueType() != Ty) return Error(TyLoc, "forward reference and definition of global have different types"); -- 2.7.4