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/SBUnixSignals.cpp | |
parent | 982a35eb1df71b10b721cfbf732a8fbf0d94ea7f (diff) | |
download | bcm5719-llvm-ae211ece6a90c367ef0cdbabad3110aba3fcda67.tar.gz bcm5719-llvm-ae211ece6a90c367ef0cdbabad3110aba3fcda67.zip |
[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/SBUnixSignals.cpp')
-rw-r--r-- | lldb/source/API/SBUnixSignals.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lldb/source/API/SBUnixSignals.cpp b/lldb/source/API/SBUnixSignals.cpp index 26a5be9c5eb..b4122b22fd6 100644 --- a/lldb/source/API/SBUnixSignals.cpp +++ b/lldb/source/API/SBUnixSignals.cpp @@ -171,3 +171,36 @@ int32_t SBUnixSignals::GetSignalAtIndex(int32_t index) const { return LLDB_INVALID_SIGNAL_NUMBER; } + +namespace lldb_private { +namespace repro { + +template <> +void RegisterMethods<SBUnixSignals>(Registry &R) { + LLDB_REGISTER_CONSTRUCTOR(SBUnixSignals, ()); + LLDB_REGISTER_CONSTRUCTOR(SBUnixSignals, (const lldb::SBUnixSignals &)); + LLDB_REGISTER_METHOD( + const lldb::SBUnixSignals &, + SBUnixSignals, operator=,(const lldb::SBUnixSignals &)); + LLDB_REGISTER_METHOD(void, SBUnixSignals, Clear, ()); + LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, IsValid, ()); + LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, operator bool, ()); + LLDB_REGISTER_METHOD_CONST(const char *, SBUnixSignals, GetSignalAsCString, + (int32_t)); + LLDB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetSignalNumberFromName, + (const char *)); + LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldSuppress, + (int32_t)); + LLDB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldSuppress, + (int32_t, bool)); + LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldStop, (int32_t)); + LLDB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldStop, (int32_t, bool)); + LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, GetShouldNotify, (int32_t)); + LLDB_REGISTER_METHOD(bool, SBUnixSignals, SetShouldNotify, (int32_t, bool)); + LLDB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetNumSignals, ()); + LLDB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetSignalAtIndex, + (int32_t)); +} + +} +} |