projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94fe9d4
)
[ORC] LastKey needs to be protected to prevent data races.
author
Lang Hames
<lhames@gmail.com>
Thu, 27 Sep 2018 19:27:20 +0000
(19:27 +0000)
committer
Lang Hames
<lhames@gmail.com>
Thu, 27 Sep 2018 19:27:20 +0000
(19:27 +0000)
llvm-svn: 343256
llvm/include/llvm/ExecutionEngine/Orc/Core.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/ExecutionEngine/Orc/Core.h
b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
index
f757057
..
6f6bd2e
100644
(file)
--- a/
llvm/include/llvm/ExecutionEngine/Orc/Core.h
+++ b/
llvm/include/llvm/ExecutionEngine/Orc/Core.h
@@
-655,7
+655,9
@@
public:
bool AddToMainDylibSearchOrder = true);
/// Allocate a module key for a new module to add to the JIT.
- VModuleKey allocateVModule() { return ++LastKey; }
+ VModuleKey allocateVModule() {
+ return runSessionLocked([this]() { return ++LastKey; });
+ }
/// Return a module key to the ExecutionSession so that it can be
/// re-used. This should only be done once all resources associated