[Lldb-commits] [PATCH] D148401: [lldb/API] Add convenience constructor for SBError (NFC)

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 25 15:04:53 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGaf1fea818391: [lldb/API] Add convenience constructor for SBError (NFC) (authored by mib).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148401/new/

https://reviews.llvm.org/D148401

Files:
  lldb/include/lldb/API/SBError.h
  lldb/source/API/SBError.cpp


Index: lldb/source/API/SBError.cpp
===================================================================
--- lldb/source/API/SBError.cpp
+++ lldb/source/API/SBError.cpp
@@ -25,6 +25,12 @@
   m_opaque_up = clone(rhs.m_opaque_up);
 }
 
+SBError::SBError(const char *message) {
+  LLDB_INSTRUMENT_VA(this, message);
+
+  SetErrorString(message);
+}
+
 SBError::SBError(const lldb_private::Status &status)
     : m_opaque_up(new Status(status)) {
   LLDB_INSTRUMENT_VA(this, status);
Index: lldb/include/lldb/API/SBError.h
===================================================================
--- lldb/include/lldb/API/SBError.h
+++ lldb/include/lldb/API/SBError.h
@@ -23,6 +23,8 @@
 
   SBError(const lldb::SBError &rhs);
 
+  SBError(const char *message);
+
 #ifndef SWIG
   SBError(const lldb_private::Status &error);
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148401.516946.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230425/f3ea881d/attachment.bin>


More information about the lldb-commits mailing list