From 4cae6228d129d4c4dfb156c043977bb6b5690031 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Tue, 6 Oct 2020 16:35:35 +0200 Subject: [ADT] function_ref's constructor is unavailable if the argument is not callable. This allows overload sets containing function_ref arguments to work correctly Otherwise they're ambiguous as anything "could be" converted to a function_ref. This matches proposed std::function_ref, absl::function_ref, etc. Differential Revision: https://reviews.llvm.org/D88901 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 4d69dd7..15ca3a5 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -579,9 +579,7 @@ public: /// \returns true if an error occurred. Error parseBitcodeInto( Module *M, bool ShouldLazyLoadMetadata = false, bool IsImporting = false, - DataLayoutCallbackTy DataLayoutCallback = [](std::string) { - return None; - }); + DataLayoutCallbackTy DataLayoutCallback = [](StringRef) { return None; }); static uint64_t decodeSignRotatedValue(uint64_t V); -- cgit v1.1