tsan: prepare for migration to new memory_order enum values (ABI compatible)
llvm-svn: 165107
diff --git a/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
index 17b7775..9ad86f4 100644
--- a/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
@@ -350,7 +350,8 @@
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) {