[ORC] Avoid SymbolStringPtr copies in DynamicLibrarySearchGenerator predicate.

Pass SymbolStringPtr by const-ref to avoid copies (which require atomic
ref-count operations).
This commit is contained in:
Lang Hames 2019-10-25 17:59:17 -07:00
parent 93b29d3882
commit 4141bb50a8
1 changed files with 1 additions and 1 deletions

View File

@ -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<bool(SymbolStringPtr)>;
using SymbolPredicate = std::function<bool(const SymbolStringPtr &)>;
/// Create a DynamicLibrarySearchGenerator that searches for symbols in the
/// given sys::DynamicLibrary.