diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-03 16:57:07 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-01-03 16:57:07 +0000 |
| commit | 77dbea07356e1ab2f37a777d4d1ddc5dd3e301c2 (patch) | |
| tree | bdb0bc8db7a91e1f8b4bb8729fc391e2adf45380 /llvm/lib/TextAPI | |
| parent | 99aabd70801bd4bc72c4942747f6d62c675112f5 (diff) | |
Diffstat (limited to 'llvm/lib/TextAPI')
| -rw-r--r-- | llvm/lib/TextAPI/TextStubV5.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/TextAPI/TextStubV5.cpp b/llvm/lib/TextAPI/TextStubV5.cpp index 2f82bc03480b..aea772dbc4be 100644 --- a/llvm/lib/TextAPI/TextStubV5.cpp +++ b/llvm/lib/TextAPI/TextStubV5.cpp @@ -201,8 +201,9 @@ Expected<StubT> getRequiredValue( template <typename JsonT, typename StubT = JsonT> Expected<StubT> getRequiredValue( TBDKey Key, const Object *Obj, - std::function<std::optional<JsonT>(const Object *, StringRef)> GetValue, - StubT DefaultValue, std::function<std::optional<StubT>(JsonT)> Validate) { + std::function<std::optional<JsonT>(const Object *, StringRef)> const + GetValue, + StubT DefaultValue, function_ref<std::optional<StubT>(JsonT)> Validate) { std::optional<JsonT> Val = GetValue(Obj, Keys[Key]); if (!Val) return DefaultValue; @@ -215,7 +216,7 @@ Expected<StubT> getRequiredValue( } Error collectFromArray(TBDKey Key, const Object *Obj, - std::function<void(StringRef)> Append, + function_ref<void(StringRef)> Append, bool IsRequired = false) { const auto *Values = Obj->getArray(Keys[Key]); if (!Values) { |
