aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-24 17:20:04 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-24 17:20:04 +0000
commit2f87640b86315beab8a5671cc23f524e59c58bd3 (patch)
treecb18e28b2d6aa7b36dcca2f78cab41f315409d51 /lib/Transforms/Instrumentation/ThreadSanitizer.cpp
parentaa76e9e2cf50af190de90bc778b7f7e42ef9ceff (diff)
Delete a directory that wasn't supposed to be checked in yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166591 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ThreadSanitizer.cpp')
-rw-r--r--lib/Transforms/Instrumentation/ThreadSanitizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
index c6244a55c9..8536e9a41a 100644
--- a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
@@ -375,7 +375,7 @@ bool ThreadSanitizer::instrumentAtomic(Instruction *I) {
const size_t ByteSize = 1 << Idx;
const size_t BitSize = ByteSize * 8;
Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize);
- Type *PtrTy = Ty->getPointerTo();
+ Type *PtrTy = Ty->getPointerTo(Addr->getType());
Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
createOrdering(&IRB, LI->getOrdering())};
CallInst *C = CallInst::Create(TsanAtomicLoad[Idx],
@@ -390,7 +390,7 @@ bool ThreadSanitizer::instrumentAtomic(Instruction *I) {
const size_t ByteSize = 1 << Idx;
const size_t BitSize = ByteSize * 8;
Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize);
- Type *PtrTy = Ty->getPointerTo();
+ Type *PtrTy = Ty->getPointerTo(Addr->getType());
Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
IRB.CreateIntCast(SI->getValueOperand(), Ty, false),
createOrdering(&IRB, SI->getOrdering())};