aboutsummaryrefslogtreecommitdiffstats
path: root/include/lldb/API/SBCommandReturnObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/API/SBCommandReturnObject.h')
-rw-r--r--include/lldb/API/SBCommandReturnObject.h52
1 files changed, 35 insertions, 17 deletions
diff --git a/include/lldb/API/SBCommandReturnObject.h b/include/lldb/API/SBCommandReturnObject.h
index 2877afb9b8b0..e3fbacf85afc 100644
--- a/include/lldb/API/SBCommandReturnObject.h
+++ b/include/lldb/API/SBCommandReturnObject.h
@@ -15,23 +15,27 @@
#include "lldb/API/SBDefines.h"
+namespace lldb_private {
+class SBCommandReturnObjectImpl;
+}
+
namespace lldb {
class LLDB_API SBCommandReturnObject {
public:
SBCommandReturnObject();
+ SBCommandReturnObject(lldb_private::CommandReturnObject &ref);
+
+ // rvalue ctor+assignment are incompatible with Reproducers.
+
SBCommandReturnObject(const lldb::SBCommandReturnObject &rhs);
~SBCommandReturnObject();
- const lldb::SBCommandReturnObject &
+ lldb::SBCommandReturnObject &
operator=(const lldb::SBCommandReturnObject &rhs);
- SBCommandReturnObject(lldb_private::CommandReturnObject *ptr);
-
- lldb_private::CommandReturnObject *Release();
-
explicit operator bool() const;
bool IsValid() const;
@@ -40,13 +44,21 @@ public:
const char *GetError();
- size_t PutOutput(FILE *fh);
+ size_t PutOutput(FILE *fh); // DEPRECATED
+
+ size_t PutOutput(SBFile file);
+
+ size_t PutOutput(FileSP file);
size_t GetOutputSize();
size_t GetErrorSize();
- size_t PutError(FILE *fh);
+ size_t PutError(FILE *fh); // DEPRECATED
+
+ size_t PutError(SBFile file);
+
+ size_t PutError(FileSP file);
void Clear();
@@ -64,14 +76,21 @@ public:
bool GetDescription(lldb::SBStream &description);
- // deprecated, these two functions do not take ownership of file handle
- void SetImmediateOutputFile(FILE *fh);
+ void SetImmediateOutputFile(FILE *fh); // DEPRECATED
- void SetImmediateErrorFile(FILE *fh);
+ void SetImmediateErrorFile(FILE *fh); // DEPRECATED
- void SetImmediateOutputFile(FILE *fh, bool transfer_ownership);
+ void SetImmediateOutputFile(FILE *fh, bool transfer_ownership); // DEPRECATED
- void SetImmediateErrorFile(FILE *fh, bool transfer_ownership);
+ void SetImmediateErrorFile(FILE *fh, bool transfer_ownership); // DEPRECATED
+
+ void SetImmediateOutputFile(SBFile file);
+
+ void SetImmediateErrorFile(SBFile file);
+
+ void SetImmediateOutputFile(FileSP file);
+
+ void SetImmediateErrorFile(FileSP file);
void PutCString(const char *string, int len = -1);
@@ -86,6 +105,9 @@ public:
void SetError(const char *error_cstr);
+ // ref() is internal for LLDB only.
+ lldb_private::CommandReturnObject &ref() const;
+
protected:
friend class SBCommandInterpreter;
friend class SBOptions;
@@ -96,12 +118,8 @@ protected:
lldb_private::CommandReturnObject &operator*() const;
- lldb_private::CommandReturnObject &ref() const;
-
- void SetLLDBObjectPtr(lldb_private::CommandReturnObject *ptr);
-
private:
- std::unique_ptr<lldb_private::CommandReturnObject> m_opaque_up;
+ std::unique_ptr<lldb_private::SBCommandReturnObjectImpl> m_opaque_up;
};
} // namespace lldb