diff options
| author | Michal Gorny <mgorny@gentoo.org> | 2019-03-19 17:13:13 +0000 |
|---|---|---|
| committer | Michal Gorny <mgorny@gentoo.org> | 2019-03-19 17:13:13 +0000 |
| commit | ae211ece6a90c367ef0cdbabad3110aba3fcda67 (patch) | |
| tree | 5d2f5ce1ffe5332ccb1e1682daad3f365a2f38e0 /lldb/source/API/SBEvent.cpp | |
| parent | 982a35eb1df71b10b721cfbf732a8fbf0d94ea7f (diff) | |
[lldb] [Reproducer] Move SBRegistry registration into declaring files
Move SBRegistry method registrations from SBReproducer.cpp into files
declaring the individual APIs, in order to reduce the memory consumption
during build and improve maintainability. The current humongous
SBRegistry constructor exhausts all memory on a NetBSD system with 4G
RAM + 4G swap, therefore making it impossible to build LLDB.
Differential Revision: https://reviews.llvm.org/D59427
llvm-svn: 356481
Diffstat (limited to 'lldb/source/API/SBEvent.cpp')
| -rw-r--r-- | lldb/source/API/SBEvent.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lldb/source/API/SBEvent.cpp b/lldb/source/API/SBEvent.cpp index 9cb2ab4dd2bd..12fefc9e9836 100644 --- a/lldb/source/API/SBEvent.cpp +++ b/lldb/source/API/SBEvent.cpp @@ -206,3 +206,37 @@ bool SBEvent::GetDescription(SBStream &description) const { return true; } + +namespace lldb_private { +namespace repro { + +template <> +void RegisterMethods<SBEvent>(Registry &R) { + LLDB_REGISTER_CONSTRUCTOR(SBEvent, ()); + LLDB_REGISTER_CONSTRUCTOR(SBEvent, (uint32_t, const char *, uint32_t)); + LLDB_REGISTER_CONSTRUCTOR(SBEvent, (lldb::EventSP &)); + LLDB_REGISTER_CONSTRUCTOR(SBEvent, (lldb_private::Event *)); + LLDB_REGISTER_CONSTRUCTOR(SBEvent, (const lldb::SBEvent &)); + LLDB_REGISTER_METHOD(const lldb::SBEvent &, + SBEvent, operator=,(const lldb::SBEvent &)); + LLDB_REGISTER_METHOD(const char *, SBEvent, GetDataFlavor, ()); + LLDB_REGISTER_METHOD_CONST(uint32_t, SBEvent, GetType, ()); + LLDB_REGISTER_METHOD_CONST(lldb::SBBroadcaster, SBEvent, GetBroadcaster, + ()); + LLDB_REGISTER_METHOD_CONST(const char *, SBEvent, GetBroadcasterClass, ()); + LLDB_REGISTER_METHOD(bool, SBEvent, BroadcasterMatchesPtr, + (const lldb::SBBroadcaster *)); + LLDB_REGISTER_METHOD(bool, SBEvent, BroadcasterMatchesRef, + (const lldb::SBBroadcaster &)); + LLDB_REGISTER_METHOD(void, SBEvent, Clear, ()); + LLDB_REGISTER_METHOD_CONST(bool, SBEvent, IsValid, ()); + LLDB_REGISTER_METHOD_CONST(bool, SBEvent, operator bool, ()); + LLDB_REGISTER_STATIC_METHOD(const char *, SBEvent, GetCStringFromEvent, + (const lldb::SBEvent &)); + LLDB_REGISTER_METHOD(bool, SBEvent, GetDescription, (lldb::SBStream &)); + LLDB_REGISTER_METHOD_CONST(bool, SBEvent, GetDescription, + (lldb::SBStream &)); +} + +} +} |
