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:
Roman Levenstein
2016-10-08 02:35:15 -07:00
parent 69ae397833
commit 6c71745453

View File

@@ -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.