From 26ca5a57bc4cb85ebb62cb3a3fc01dbeb3503554 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 9 Apr 2019 09:03:43 +0000 Subject: Remove unneeded #ifdef SWIGs Summary: Some of these were present in files which should never be read by swig (and we also had one in the interface file, which is only read by swig). They are probably leftovers from the time when we were running swig over lldb headers directly. While writing this patch, I noticed that some of the #ifdefs were guarding public functions that were operating on lldb_private data types. While it wasn't strictly necessary for this patch, I made these private, as nobody should really be accessing them. This can potentially break existing code if it happened to use these methods, though it will only break at build time -- if someone builds against an old header, he should still be able to link to a new lldb library, since the functions are still there. We could keep these public for backward compatbility, but I would argue that if anyone was actually using these functions for anything, his code is already broken. Reviewers: JDevlieghere, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60400 llvm-svn: 357984 --- lldb/source/API/SBThread.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'lldb/source/API/SBThread.cpp') diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index 4d2cf3364b6..3ec03f28a0c 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -1398,21 +1398,11 @@ bool SBThread::SafeToCallFunctions() { } lldb_private::Thread *SBThread::operator->() { - LLDB_RECORD_METHOD_NO_ARGS(lldb_private::Thread *, SBThread, operator->); - - ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); - if (thread_sp) - return LLDB_RECORD_RESULT(thread_sp.get()); - return nullptr; + return get(); } lldb_private::Thread *SBThread::get() { - LLDB_RECORD_METHOD_NO_ARGS(lldb_private::Thread *, SBThread, get); - - ThreadSP thread_sp(m_opaque_sp->GetThreadSP()); - if (thread_sp) - return LLDB_RECORD_RESULT(thread_sp.get()); - return nullptr; + return m_opaque_sp->GetThreadSP().get(); } namespace lldb_private { @@ -1516,8 +1506,6 @@ void RegisterMethods(Registry &R) { LLDB_REGISTER_METHOD(lldb::SBThread, SBThread, GetCurrentExceptionBacktrace, ()); LLDB_REGISTER_METHOD(bool, SBThread, SafeToCallFunctions, ()); - LLDB_REGISTER_METHOD(lldb_private::Thread *, SBThread, operator->,()); - LLDB_REGISTER_METHOD(lldb_private::Thread *, SBThread, get, ()); } } -- cgit v1.2.3