[PATCH] D62139: Ensuring unique names for JITDylib's
Praveen velliengiri via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 08:25:17 PDT 2019
pree-jackie updated this revision to Diff 200301.
pree-jackie added a comment.
Wrapping the getJITDylibByName by runSessionLocked Interface to make thread safe creation of JITDylibs
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62139/new/
https://reviews.llvm.org/D62139
Files:
llvm/lib/ExecutionEngine/Orc/Core.cpp
Index: llvm/lib/ExecutionEngine/Orc/Core.cpp
===================================================================
--- llvm/lib/ExecutionEngine/Orc/Core.cpp
+++ llvm/lib/ExecutionEngine/Orc/Core.cpp
@@ -1611,11 +1611,13 @@
}
JITDylib *ExecutionSession::getJITDylibByName(std::string Name) {
- for (auto &JD : JDs) {
- if (JD->getName() == Name)
- return JD.get();
- }
- return nullptr;
+ return runSessionLocked([&, this]() -> JITDylib * {
+ for (auto &JD : JDs) {
+ if (JD->getName() == Name)
+ return JD.get();
+ }
+ return nullptr;
+ });
}
JITDylib &ExecutionSession::createJITDylib(std::string Name,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62139.200301.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190520/c949b704/attachment.bin>
More information about the llvm-commits
mailing list