mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Start fleshing out RemoteAST's storage-offset API.
This commit is contained in:
@@ -318,14 +318,9 @@ template <> struct Failure::ArgTypesForFailureKind<Failure::KIND##_t> { \
|
||||
};
|
||||
#include "swift/Remote/FailureKinds.def"
|
||||
|
||||
template <>
|
||||
struct Failure::IsAcceptableArgType<Failure::ArgType_String, const char *> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Failure::IsAcceptableArgType<Failure::ArgType_String, std::string> {
|
||||
static constexpr bool value = true;
|
||||
template <class T>
|
||||
struct Failure::IsAcceptableArgType<Failure::ArgType_String, T> {
|
||||
static constexpr bool value = std::is_convertible<T, std::string>::value;
|
||||
};
|
||||
|
||||
template <>
|
||||
|
||||
@@ -13,9 +13,16 @@
|
||||
// FAILURE(KIND, TEXT, ARGTYS)
|
||||
|
||||
FAILURE(Unknown, "an unknown failure occurred", ())
|
||||
FAILURE(BadArgument, "the API was called with a bad argument", ())
|
||||
|
||||
FAILURE(Memory, "an unknown failure occurred while reading %0 at address %1",
|
||||
(String, Address))
|
||||
|
||||
FAILURE(DependentArgument,
|
||||
"API was called with a dependent type", ())
|
||||
FAILURE(TypeHasNoSuchMember,
|
||||
"type has no member named '%0'", (String))
|
||||
|
||||
FAILURE(CouldNotResolveTypeDecl,
|
||||
"could not resolve a type with mangled name '%0'", (String))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user