aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-03-21 15:28:50 +0000
committerKostya Serebryany <kcc@google.com>2012-03-21 15:28:50 +0000
commit208a4ff2b56f453910bb817540f34b8169f7702a (patch)
treed0706ab38149d648ec439e56f4df42c82d8e60b7 /lib
parentd9e85ef08bdd41b285f77af6c95f5ec17b43c80a (diff)
downloadexternal_llvm-208a4ff2b56f453910bb817540f34b8169f7702a.zip
external_llvm-208a4ff2b56f453910bb817540f34b8169f7702a.tar.gz
external_llvm-208a4ff2b56f453910bb817540f34b8169f7702a.tar.bz2
[asan] fix one more bug related to long double
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153189 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Instrumentation/AddressSanitizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index a51bd7e..b43b9e5 100644
--- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -454,7 +454,7 @@ bool AddressSanitizer::insertGlobalRedzones(Module &M) {
GlobalVariable *G = GlobalsToChange[i];
PointerType *PtrTy = cast<PointerType>(G->getType());
Type *Ty = PtrTy->getElementType();
- uint64_t SizeInBytes = TD->getTypeStoreSizeInBits(Ty) / 8;
+ uint64_t SizeInBytes = TD->getTypeAllocSize(Ty);
uint64_t RightRedzoneSize = RedzoneSize +
(RedzoneSize - (SizeInBytes % RedzoneSize));
Type *RightRedZoneTy = ArrayType::get(IRB.getInt8Ty(), RightRedzoneSize);