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/SBModuleSpec.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/SBModuleSpec.cpp')
-rw-r--r-- | lldb/source/API/SBModuleSpec.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/lldb/source/API/SBModuleSpec.cpp b/lldb/source/API/SBModuleSpec.cpp index 6d984798c39..338118278b2 100644 --- a/lldb/source/API/SBModuleSpec.cpp +++ b/lldb/source/API/SBModuleSpec.cpp @@ -243,3 +243,58 @@ bool SBModuleSpecList::GetDescription(lldb::SBStream &description) { m_opaque_up->Dump(description.ref()); return true; } + +namespace lldb_private { +namespace repro { + +template <> +void RegisterMethods<SBModuleSpec>(Registry &R) { + LLDB_REGISTER_CONSTRUCTOR(SBModuleSpec, ()); + LLDB_REGISTER_CONSTRUCTOR(SBModuleSpec, (const lldb::SBModuleSpec &)); + LLDB_REGISTER_METHOD(const lldb::SBModuleSpec &, + SBModuleSpec, operator=,(const lldb::SBModuleSpec &)); + LLDB_REGISTER_METHOD_CONST(bool, SBModuleSpec, IsValid, ()); + LLDB_REGISTER_METHOD_CONST(bool, SBModuleSpec, operator bool, ()); + LLDB_REGISTER_METHOD(void, SBModuleSpec, Clear, ()); + LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetFileSpec, ()); + LLDB_REGISTER_METHOD(void, SBModuleSpec, SetFileSpec, + (const lldb::SBFileSpec &)); + LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetPlatformFileSpec, + ()); + LLDB_REGISTER_METHOD(void, SBModuleSpec, SetPlatformFileSpec, + (const lldb::SBFileSpec &)); + LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetSymbolFileSpec, ()); + LLDB_REGISTER_METHOD(void, SBModuleSpec, SetSymbolFileSpec, + (const lldb::SBFileSpec &)); + LLDB_REGISTER_METHOD(const char *, SBModuleSpec, GetObjectName, ()); + LLDB_REGISTER_METHOD(void, SBModuleSpec, SetObjectName, (const char *)); + LLDB_REGISTER_METHOD(const char *, SBModuleSpec, GetTriple, ()); + LLDB_REGISTER_METHOD(void, SBModuleSpec, SetTriple, (const char *)); + LLDB_REGISTER_METHOD(size_t, SBModuleSpec, GetUUIDLength, ()); + LLDB_REGISTER_METHOD(bool, SBModuleSpec, GetDescription, + (lldb::SBStream &)); + LLDB_REGISTER_CONSTRUCTOR(SBModuleSpecList, ()); + LLDB_REGISTER_CONSTRUCTOR(SBModuleSpecList, + (const lldb::SBModuleSpecList &)); + LLDB_REGISTER_METHOD( + lldb::SBModuleSpecList &, + SBModuleSpecList, operator=,(const lldb::SBModuleSpecList &)); + LLDB_REGISTER_STATIC_METHOD(lldb::SBModuleSpecList, SBModuleSpecList, + GetModuleSpecifications, (const char *)); + LLDB_REGISTER_METHOD(void, SBModuleSpecList, Append, + (const lldb::SBModuleSpec &)); + LLDB_REGISTER_METHOD(void, SBModuleSpecList, Append, + (const lldb::SBModuleSpecList &)); + LLDB_REGISTER_METHOD(size_t, SBModuleSpecList, GetSize, ()); + LLDB_REGISTER_METHOD(lldb::SBModuleSpec, SBModuleSpecList, GetSpecAtIndex, + (size_t)); + LLDB_REGISTER_METHOD(lldb::SBModuleSpec, SBModuleSpecList, + FindFirstMatchingSpec, (const lldb::SBModuleSpec &)); + LLDB_REGISTER_METHOD(lldb::SBModuleSpecList, SBModuleSpecList, + FindMatchingSpecs, (const lldb::SBModuleSpec &)); + LLDB_REGISTER_METHOD(bool, SBModuleSpecList, GetDescription, + (lldb::SBStream &)); +} + +} +} |