projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b91333
)
[Status] Add a LLDB_ERRORF macro for error reporting (similar to LLDB_LOGF)
author
Vedant Kumar
<vsk@apple.com>
Wed, 11 Sep 2019 21:23:42 +0000
(21:23 +0000)
committer
Vedant Kumar
<vsk@apple.com>
Wed, 11 Sep 2019 21:23:42 +0000
(21:23 +0000)
llvm-svn: 371667
lldb/include/lldb/Utility/Status.h
patch
|
blob
|
history
diff --git
a/lldb/include/lldb/Utility/Status.h
b/lldb/include/lldb/Utility/Status.h
index
71a9879
..
e6a0a8e
100644
(file)
--- a/
lldb/include/lldb/Utility/Status.h
+++ b/
lldb/include/lldb/Utility/Status.h
@@
-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