summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/TargetMachine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 8b177a89c919..a7fe329b064e 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -92,7 +92,7 @@ bool TargetMachine::isLargeGlobalValue(const GlobalValue *GVal) const {
GV->getName().starts_with("__stop_")))
return true;
const DataLayout &DL = GV->getParent()->getDataLayout();
- uint64_t Size = DL.getTypeSizeInBits(GV->getValueType()) / 8;
+ uint64_t Size = DL.getTypeAllocSize(GV->getValueType());
return Size == 0 || Size > LargeDataThreshold;
}