From 4141bb50a871c28ed7504e88e4ddb4f924a93bce Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Fri, 25 Oct 2019 17:59:17 -0700 Subject: [PATCH] [ORC] Avoid SymbolStringPtr copies in DynamicLibrarySearchGenerator predicate. Pass SymbolStringPtr by const-ref to avoid copies (which require atomic ref-count operations). --- llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ public: /// passes the 'Allow' predicate will be added to the JITDylib. class DynamicLibrarySearchGenerator : public JITDylib::DefinitionGenerator { public: - using SymbolPredicate = std::function; + using SymbolPredicate = std::function; /// Create a DynamicLibrarySearchGenerator that searches for symbols in the /// given sys::DynamicLibrary.