summaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine/Orc/RawByteChannel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ExecutionEngine/Orc/RawByteChannel.h')
-rw-r--r--include/llvm/ExecutionEngine/Orc/RawByteChannel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ExecutionEngine/Orc/RawByteChannel.h b/include/llvm/ExecutionEngine/Orc/RawByteChannel.h
index 43b597de000f..83a7b9a844f2 100644
--- a/include/llvm/ExecutionEngine/Orc/RawByteChannel.h
+++ b/include/llvm/ExecutionEngine/Orc/RawByteChannel.h
@@ -47,9 +47,9 @@ public:
/// Locks the channel for writing.
template <typename FunctionIdT, typename SequenceIdT>
Error startSendMessage(const FunctionIdT &FnId, const SequenceIdT &SeqNo) {
+ writeLock.lock();
if (auto Err = serializeSeq(*this, FnId, SeqNo))
return Err;
- writeLock.lock();
return Error::success();
}