diff options
| author | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-09 21:50:49 +0000 |
|---|---|---|
| committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-09 21:50:49 +0000 |
| commit | 9eb13719236458cd0c035ebbe882cfbf0add7bfc (patch) | |
| tree | da1a138aa2b03e0d2ebc5464541b0fec953f98fd /lldb/source/API/SBFile.cpp | |
| parent | b24022cd723f47c8dd5e78ed7b210c1b6287ff42 (diff) | |
SBFile support in SBCommandReturnObject
Summary:
This patch add SBFile interfaces to SBCommandReturnObject, and
removes the internal callers of its FILE* interfaces.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: JDevlieghere
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68434
llvm-svn: 374238
Diffstat (limited to 'lldb/source/API/SBFile.cpp')
| -rw-r--r-- | lldb/source/API/SBFile.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/API/SBFile.cpp b/lldb/source/API/SBFile.cpp index e9e6987a8ffd..5c003bc38794 100644 --- a/lldb/source/API/SBFile.cpp +++ b/lldb/source/API/SBFile.cpp @@ -23,12 +23,13 @@ SBFile::SBFile(FileSP file_sp) : m_opaque_sp(file_sp) { SBFile::SBFile() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBFile); } SBFile::SBFile(FILE *file, bool transfer_ownership) { + LLDB_RECORD_DUMMY(void, SBFile, (FILE *, bool), file, transfer_ownership); m_opaque_sp = std::make_shared<NativeFile>(file, transfer_ownership); } SBFile::SBFile(int fd, const char *mode, bool transfer_owndership) { - LLDB_RECORD_CONSTRUCTOR(SBFile, (int, const char *, bool), fd, mode, - transfer_owndership); + LLDB_RECORD_DUMMY(void, SBFile, (int, const char *, bool), fd, mode, + transfer_owndership); auto options = File::GetOptionsFromMode(mode); m_opaque_sp = std::make_shared<NativeFile>(fd, options, transfer_owndership); } @@ -104,9 +105,9 @@ bool SBFile::operator!() const { namespace lldb_private { namespace repro { + template <> void RegisterMethods<SBFile>(Registry &R) { - LLDB_REGISTER_CONSTRUCTOR(SBFile, ()); - LLDB_REGISTER_CONSTRUCTOR(SBFile, (int, const char *, bool)); + LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Flush, ()); LLDB_REGISTER_METHOD_CONST(bool, SBFile, IsValid, ()); LLDB_REGISTER_METHOD_CONST(bool, SBFile, operator bool,()); |
