summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Lint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/Lint.cpp')
-rw-r--r--llvm/lib/Analysis/Lint.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Lint.cpp b/llvm/lib/Analysis/Lint.cpp
index 2dfb09c95ad..b6d74c9c799 100644
--- a/llvm/lib/Analysis/Lint.cpp
+++ b/llvm/lib/Analysis/Lint.cpp
@@ -435,7 +435,7 @@ void Lint::visitMemoryReference(Instruction &I,
// If the global may be defined differently in another compilation unit
// then don't warn about funky memory accesses.
if (GV->hasDefinitiveInitializer()) {
- Type *GTy = GV->getType()->getElementType();
+ Type *GTy = GV->getValueType();
if (GTy->isSized())
BaseSize = DL->getTypeAllocSize(GTy);
BaseAlign = GV->getAlignment();
OpenPOWER on IntegriCloud