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
This commit is contained in:
Dmitry Vyukov 2012-11-09 14:12:16 +00:00
parent 9f8a90b3ce
commit c2e9ca15fb
2 changed files with 230 additions and 231 deletions

View File

@ -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) {

File diff suppressed because it is too large Load Diff