[Status] Add a LLDB_ERRORF macro for error reporting (similar to LLDB_LOGF)
llvm-svn: 371667
This commit is contained in:
parent
0b91333d59
commit
bb58118525
|
@ -212,4 +212,11 @@ template <> struct format_provider<lldb_private::Status> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define LLDB_ERRORF(status, fmt, ...) \
|
||||||
|
do { \
|
||||||
|
if (status) { \
|
||||||
|
(status)->SetErrorStringWithFormat((fmt), __VA_ARGS__); \
|
||||||
|
} \
|
||||||
|
} while (0);
|
||||||
|
|
||||||
#endif // #ifndef LLDB_UTILITY_STATUS_H
|
#endif // #ifndef LLDB_UTILITY_STATUS_H
|
||||||
|
|
Loading…
Reference in New Issue