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/SBFileSpec.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/SBFileSpec.cpp')
| -rw-r--r-- | lldb/source/API/SBFileSpec.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp index 048d5ed15a6b..2db008025df1 100644 --- a/lldb/source/API/SBFileSpec.cpp +++ b/lldb/source/API/SBFileSpec.cpp @@ -173,3 +173,33 @@ void SBFileSpec::AppendPathComponent(const char *fn) { m_opaque_up->AppendPathComponent(fn); } + +namespace lldb_private { +namespace repro { + +template <> +void RegisterMethods<SBFileSpec>(Registry &R) { + LLDB_REGISTER_CONSTRUCTOR(SBFileSpec, ()); + LLDB_REGISTER_CONSTRUCTOR(SBFileSpec, (const lldb::SBFileSpec &)); + LLDB_REGISTER_CONSTRUCTOR(SBFileSpec, (const char *)); + LLDB_REGISTER_CONSTRUCTOR(SBFileSpec, (const char *, bool)); + LLDB_REGISTER_METHOD(const lldb::SBFileSpec &, + SBFileSpec, operator=,(const lldb::SBFileSpec &)); + LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, IsValid, ()); + LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, operator bool, ()); + LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, Exists, ()); + LLDB_REGISTER_METHOD(bool, SBFileSpec, ResolveExecutableLocation, ()); + LLDB_REGISTER_STATIC_METHOD(int, SBFileSpec, ResolvePath, + (const char *, char *, size_t)); + LLDB_REGISTER_METHOD_CONST(const char *, SBFileSpec, GetFilename, ()); + LLDB_REGISTER_METHOD_CONST(const char *, SBFileSpec, GetDirectory, ()); + LLDB_REGISTER_METHOD(void, SBFileSpec, SetFilename, (const char *)); + LLDB_REGISTER_METHOD(void, SBFileSpec, SetDirectory, (const char *)); + LLDB_REGISTER_METHOD_CONST(uint32_t, SBFileSpec, GetPath, (char *, size_t)); + LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, GetDescription, + (lldb::SBStream &)); + LLDB_REGISTER_METHOD(void, SBFileSpec, AppendPathComponent, (const char *)); +} + +} +} |
