diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2012-11-09 14:12:16 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2012-11-09 14:12:16 +0000 |
commit | c2e9ca15fbb7ce2bc0bc79e44862d74cdd2802b9 (patch) | |
tree | d2db1d35c7e1ac1384544073592dfc2b05eb6d95 /lib/Transforms/Instrumentation/ThreadSanitizer.cpp | |
parent | 9f8a90b3ce0e248e3b68b056d4c840295facbc02 (diff) |
tsan: switch to new memory_order constants (ABI compatible)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ThreadSanitizer.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/ThreadSanitizer.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp index 27514a5b72..9e10fc4416 100644 --- a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp +++ b/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) { |