From 9a8c112dae24b72c691f77c782b1b34864ee3445 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 3 Oct 2012 13:00:57 +0000 Subject: [PATCH] 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 --- lib/Transforms/Instrumentation/ThreadSanitizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp index 17b7775434c..9ad86f4976d 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) { -- 2.11.0