mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
[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
This commit is contained in:
@@ -123,3 +123,30 @@ bool SBFileSpecList::GetDescription(SBStream &description) const {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace lldb_private {
|
||||
namespace repro {
|
||||
|
||||
template <>
|
||||
void RegisterMethods<SBFileSpecList>(Registry &R) {
|
||||
LLDB_REGISTER_CONSTRUCTOR(SBFileSpecList, ());
|
||||
LLDB_REGISTER_CONSTRUCTOR(SBFileSpecList, (const lldb::SBFileSpecList &));
|
||||
LLDB_REGISTER_METHOD(
|
||||
const lldb::SBFileSpecList &,
|
||||
SBFileSpecList, operator=,(const lldb::SBFileSpecList &));
|
||||
LLDB_REGISTER_METHOD_CONST(uint32_t, SBFileSpecList, GetSize, ());
|
||||
LLDB_REGISTER_METHOD(void, SBFileSpecList, Append,
|
||||
(const lldb::SBFileSpec &));
|
||||
LLDB_REGISTER_METHOD(bool, SBFileSpecList, AppendIfUnique,
|
||||
(const lldb::SBFileSpec &));
|
||||
LLDB_REGISTER_METHOD(void, SBFileSpecList, Clear, ());
|
||||
LLDB_REGISTER_METHOD(uint32_t, SBFileSpecList, FindFileIndex,
|
||||
(uint32_t, const lldb::SBFileSpec &, bool));
|
||||
LLDB_REGISTER_METHOD_CONST(const lldb::SBFileSpec, SBFileSpecList,
|
||||
GetFileSpecAtIndex, (uint32_t));
|
||||
LLDB_REGISTER_METHOD_CONST(bool, SBFileSpecList, GetDescription,
|
||||
(lldb::SBStream &));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user