diff options
author | Manuel Jacob <me@manueljacob.de> | 2016-01-16 20:30:46 +0000 |
---|---|---|
committer | Manuel Jacob <me@manueljacob.de> | 2016-01-16 20:30:46 +0000 |
commit | 5f6eaac6115a44f4ef3d819123f8694d3d5825ea (patch) | |
tree | 4f2535126e469abb4e8af765dcd1692ec466424a /llvm/lib/IR/Globals.cpp | |
parent | 7cdedc1e029ea5860f9077abb39013ae7cc6e9cf (diff) | |
download | bcm5719-llvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.tar.gz bcm5719-llvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.zip |
GlobalValue: use getValueType() instead of getType()->getPointerElementType().
Reviewers: mjacob
Subscribers: jholewinski, arsenm, dsanders, dblaikie
Patch by Eduard Burtescu.
Differential Revision: http://reviews.llvm.org/D16260
llvm-svn: 257999
Diffstat (limited to 'llvm/lib/IR/Globals.cpp')
-rw-r--r-- | llvm/lib/IR/Globals.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp index a61b62bd968..2b8a4cf029a 100644 --- a/llvm/lib/IR/Globals.cpp +++ b/llvm/lib/IR/Globals.cpp @@ -242,7 +242,7 @@ void GlobalVariable::setInitializer(Constant *InitVal) { setGlobalVariableNumOperands(0); } } else { - assert(InitVal->getType() == getType()->getElementType() && + assert(InitVal->getType() == getValueType() && "Initializer type must match GlobalVariable type"); // Note, the num operands is used to compute the offset of the operand, so // the order here matters. We need to set num operands to 1 first so that |