aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2012-10-03 13:00:57 +0000
committerDmitry Vyukov <dvyukov@google.com>2012-10-03 13:00:57 +0000
commit9a8c112dae24b72c691f77c782b1b34864ee3445 (patch)
treef279a574053413b30bff4b32577e2c71807719c2 /lib/Transforms/Instrumentation/ThreadSanitizer.cpp
parent541a858f1a4e65a714fe54293d43d0861cd12b8f (diff)
tsan: prepare for migration to new memory_order enum values (ABI compatible)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ThreadSanitizer.cpp')
-rw-r--r--lib/Transforms/Instrumentation/ThreadSanitizer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
index 17b7775434..9ad86f4976 100644
--- a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
@@ -350,7 +350,8 @@ static ConstantInt *createOrdering(IRBuilder<> *IRB, AtomicOrdering ord) {
case AcquireRelease: v = 1 << 4; break;
case SequentiallyConsistent: v = 1 << 5; break;
}
- return IRB->getInt32(v);
+ // +100500 is temporal to migrate to new enum values.
+ return IRB->getInt32(v + 100500);
}
bool ThreadSanitizer::instrumentAtomic(Instruction *I) {