[llvm] 4141bb5 - [ORC] Avoid SymbolStringPtr copies in DynamicLibrarySearchGenerator predicate.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 18:19:33 PDT 2019
Author: Lang Hames
Date: 2019-10-25T18:19:25-07:00
New Revision: 4141bb50a871c28ed7504e88e4ddb4f924a93bce
URL: https://github.com/llvm/llvm-project/commit/4141bb50a871c28ed7504e88e4ddb4f924a93bce
DIFF: https://github.com/llvm/llvm-project/commit/4141bb50a871c28ed7504e88e4ddb4f924a93bce.diff
LOG: [ORC] Avoid SymbolStringPtr copies in DynamicLibrarySearchGenerator predicate.
Pass SymbolStringPtr by const-ref to avoid copies (which require atomic
ref-count operations).
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
index cf0a428662ef..b9bbace6f630 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
@@ -242,7 +242,7 @@ class LocalCXXRuntimeOverrides : public LocalCXXRuntimeOverridesBase {
/// passes the 'Allow' predicate will be added to the JITDylib.
class DynamicLibrarySearchGenerator : public JITDylib::DefinitionGenerator {
public:
- using SymbolPredicate = std::function<bool(SymbolStringPtr)>;
+ using SymbolPredicate = std::function<bool(const SymbolStringPtr &)>;
/// Create a DynamicLibrarySearchGenerator that searches for symbols in the
/// given sys::DynamicLibrary.
More information about the llvm-commits
mailing list