Skip to content

Commit 6c71745

Browse files
committed
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.
1 parent 69ae397 commit 6c71745

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Serialization/ModuleFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ModuleFile : public LazyMemberLoader {
7979
StringRef IdentifierData;
8080

8181
/// A callback to be invoked every time a type was deserialized.
82-
llvm::function_ref<void(Type)> DeserializedTypeCallback;
82+
std::function<void(Type)> DeserializedTypeCallback;
8383

8484
public:
8585
/// Represents another module that has been imported as a dependency.

0 commit comments

Comments
 (0)