summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2012-11-09 14:12:16 +0000
committerDmitry Vyukov <dvyukov@google.com>2012-11-09 14:12:16 +0000
commit0044e386e9738cf7d6aa8eb5c15b921838d6b727 (patch)
tree2325cf739e1df36b0e5e641421952a26d2559570 /llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
parent805006b0abf27820d5d1c9efd7171954fd4bbd23 (diff)
downloadbcm5719-llvm-0044e386e9738cf7d6aa8eb5c15b921838d6b727.tar.gz
bcm5719-llvm-0044e386e9738cf7d6aa8eb5c15b921838d6b727.zip
tsan: switch to new memory_order constants (ABI compatible)
llvm-svn: 167615
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
index 27514a5b72c..9e10fc4416d 100644
--- a/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
@@ -390,15 +390,14 @@ static ConstantInt *createOrdering(IRBuilder<> *IRB, AtomicOrdering ord) {
switch (ord) {
case NotAtomic: assert(false);
case Unordered: // Fall-through.
- case Monotonic: v = 1 << 0; break;
- // case Consume: v = 1 << 1; break; // Not specified yet.
- case Acquire: v = 1 << 2; break;
- case Release: v = 1 << 3; break;
- case AcquireRelease: v = 1 << 4; break;
- case SequentiallyConsistent: v = 1 << 5; break;
+ case Monotonic: v = 0; break;
+ // case Consume: v = 1; break; // Not specified yet.
+ case Acquire: v = 2; break;
+ case Release: v = 3; break;
+ case AcquireRelease: v = 4; break;
+ case SequentiallyConsistent: v = 5; break;
}
- // +100500 is temporal to migrate to new enum values.
- return IRB->getInt32(v + 100500);
+ return IRB->getInt32(v);
}
bool ThreadSanitizer::instrumentAtomic(Instruction *I) {
OpenPOWER on IntegriCloud