aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2020-10-06 16:35:35 +0200
committerSam McCall <sam.mccall@gmail.com>2020-10-07 16:31:09 +0200
commit4cae6228d129d4c4dfb156c043977bb6b5690031 (patch)
tree59dc83fef81df1ac56697ac70294a35e4463b5f2 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent149dc94c1d52c5f78e2aadb57a72dd437fe55aa1 (diff)
downloadllvm-4cae6228d129d4c4dfb156c043977bb6b5690031.zip
llvm-4cae6228d129d4c4dfb156c043977bb6b5690031.tar.gz
llvm-4cae6228d129d4c4dfb156c043977bb6b5690031.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp4
1 files changed, 1 insertions, 3 deletions
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);