File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
llvm/lib/Frontend/Offloading Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,18 @@ void llvm::offloading::writePropertiesToJSON(
3737 });
3838}
3939
40+ // note: createStringError has an overload that takes a format string,
41+ // but it uses llvm::format instead of llvm::formatv, which does
42+ // not work with json::Value. This is a helper function to use
43+ // llvm::formatv with createStringError.
4044template <typename ... Ts> auto createStringErrorV (Ts &&...Args) {
41- return createStringError (formatv (Args...));
45+ return createStringError (formatv (std::forward<Ts>( Args) ...));
4246}
4347
4448Expected<PropertyValue>
4549readPropertyValueFromJSON (const json::Value &PropValueVal) {
46- if (std::optional<uint64_t > Val = PropValueVal.getAsUINT64 ()) {
50+ if (std::optional<uint64_t > Val = PropValueVal.getAsUINT64 ())
4751 return PropertyValue (static_cast <uint32_t >(*Val));
48- }
4952
5053 if (std::optional<StringRef> Val = PropValueVal.getAsString ()) {
5154 std::vector<char > Decoded;
You can’t perform that action at this time.
0 commit comments