21 if (!
Spec.contains(
'='))
23 Spec,
"expected '<transport>[:<action>]=<descriptor>', but found "
26 auto [LHS, Descriptor] =
Spec.split(
'=');
27 auto [Transport, Action] = LHS.split(
':');
29 if (Transport.empty())
34 if (LHS.contains(
':') && Action.empty())
37 return ConnectionSpec(Transport.str(), Action.str(), Descriptor.str());
static Error makeConnectionSpecError(StringRef Spec, const Twine &Msg)
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
static LLVM_ABI Expected< ConnectionSpec > parse(StringRef Spec)
Parses Spec as <transport>[:<action>]=<descriptor>.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.