diff options
| author | Pavel Labath <pavel@labath.sk> | 2019-04-09 09:03:43 +0000 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2019-04-09 09:03:43 +0000 |
| commit | 26ca5a57bc4cb85ebb62cb3a3fc01dbeb3503554 (patch) | |
| tree | 226d7a42b5783a065226173ed3d4aa63f095ea68 /lldb/source/API/SBThread.cpp | |
| parent | 7e01ce2ed15a6d25097bedd70f5f91af516a7149 (diff) | |
| download | bcm5719-llvm-26ca5a57bc4cb85ebb62cb3a3fc01dbeb3503554.tar.gz bcm5719-llvm-26ca5a57bc4cb85ebb62cb3a3fc01dbeb3503554.zip | |
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
Diffstat (limited to 'lldb/source/API/SBThread.cpp')
| -rw-r--r-- | lldb/source/API/SBThread.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
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<SBThread>(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, ()); } } |

