[llvm] r237312 - [opaque pointer type] Use the value type of the GlobalVariable rather than accessing it through the pointee's type
David Blaikie
dblaikie at gmail.com
Wed May 13 15:55:01 PDT 2015
Author: dblaikie
Date: Wed May 13 17:55:01 2015
New Revision: 237312
URL: http://llvm.org/viewvc/llvm-project?rev=237312&view=rev
Log:
[opaque pointer type] Use the value type of the GlobalVariable rather than accessing it through the pointee's 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=237312&r1=237311&r2=237312&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Wed May 13 17:55:01 2015
@@ -776,7 +776,7 @@ bool LLParser::ParseGlobal(const std::st
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");
More information about the llvm-commits
mailing list