mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Use std::function instead of llvm::function_ref for a callback field.
According to the documentation, llvm::function_ref is better suited for function parameters taking closures. But in this case we need to store a closure in the callback field and then invoke it multiple times. Therefore it is more appropriate to use std::function for this purpose.
This commit is contained in:
@@ -79,7 +79,7 @@ class ModuleFile : public LazyMemberLoader {
|
||||
StringRef IdentifierData;
|
||||
|
||||
/// A callback to be invoked every time a type was deserialized.
|
||||
llvm::function_ref<void(Type)> DeserializedTypeCallback;
|
||||
std::function<void(Type)> DeserializedTypeCallback;
|
||||
|
||||
public:
|
||||
/// Represents another module that has been imported as a dependency.
|
||||
|
||||
Reference in New Issue
Block a user