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
This commit is contained in:
Pavel Labath
2019-04-09 09:03:43 +00:00
parent 7e01ce2ed1
commit 26ca5a57bc
9 changed files with 11 additions and 58 deletions

View File

@@ -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, ());
}
}