From 9eb13719236458cd0c035ebbe882cfbf0add7bfc Mon Sep 17 00:00:00 2001 From: Lawrence D'Anna Date: Wed, 9 Oct 2019 21:50:49 +0000 Subject: 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 --- lldb/source/API/SBFile.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lldb/source/API/SBFile.cpp') 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(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(fd, options, transfer_owndership); } @@ -104,9 +105,9 @@ bool SBFile::operator!() const { namespace lldb_private { namespace repro { + template <> void RegisterMethods(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,()); -- cgit v1.2.3