diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-05-13 22:54:54 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-05-13 22:54:54 +0000 |
| commit | e7107060f8d1a0b771a9c0e242006d2c355f8abc (patch) | |
| tree | da09260def4e9188811065c23cb8dba33188b4c9 /llvm/lib | |
| parent | 6dc139729882d5c363dda1e0994a71b88da4bd5e (diff) | |
| download | bcm5719-llvm-e7107060f8d1a0b771a9c0e242006d2c355f8abc.tar.gz bcm5719-llvm-e7107060f8d1a0b771a9c0e242006d2c355f8abc.zip | |
[opaque pointer type] Use GlobalVariable::getValueType rather than accessing it through the GV's pointee type
llvm-svn: 237311
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index ec3414d2530..16b113df1b8 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -1385,7 +1385,7 @@ static ICmpInst::Predicate areGlobalsPotentiallyEqual(const GlobalValue *GV1, if (GV->hasExternalWeakLinkage() || GV->hasWeakAnyLinkage()) return true; if (const auto *GVar = dyn_cast<GlobalVariable>(GV)) { - Type *Ty = GVar->getType()->getPointerElementType(); + Type *Ty = GVar->getValueType(); // A global with opaque type might end up being zero sized. if (!Ty->isSized()) return true; |

