[Lldb-commits] [lldb] e095e98 - [lldb] Add missing LLDB_REGISTER for GarbageCollectAllocatedModules

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 17 10:14:48 PDT 2020


Author: Jonas Devlieghere
Date: 2020-08-17T10:14:41-07:00
New Revision: e095e98a3abc8b2852b708cb4c8cbeec0b8f1d51

URL: https://github.com/llvm/llvm-project/commit/e095e98a3abc8b2852b708cb4c8cbeec0b8f1d51
DIFF: https://github.com/llvm/llvm-project/commit/e095e98a3abc8b2852b708cb4c8cbeec0b8f1d51.diff

LOG: [lldb] Add missing LLDB_REGISTER for GarbageCollectAllocatedModules

Add the missing LLDB_REGISTER_STATIC_METHOD macro and format the file.

Added: 
    

Modified: 
    lldb/source/API/SBModule.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index 883319b8078c..b5b9fe16aa63 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -67,8 +67,8 @@ SBModule::SBModule(lldb::SBProcess &process, lldb::addr_t header_addr)
 }
 
 const SBModule &SBModule::operator=(const SBModule &rhs) {
-  LLDB_RECORD_METHOD(const lldb::SBModule &,
-                     SBModule, operator=,(const lldb::SBModule &), rhs);
+  LLDB_RECORD_METHOD(const lldb::SBModule &, SBModule, operator=,
+                     (const lldb::SBModule &), rhs);
 
   if (this != &rhs)
     m_opaque_sp = rhs.m_opaque_sp;
@@ -108,7 +108,6 @@ lldb::SBFileSpec SBModule::GetPlatformFileSpec() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBModule,
                                    GetPlatformFileSpec);
 
-
   SBFileSpec file_spec;
   ModuleSP module_sp(GetSP());
   if (module_sp)
@@ -187,7 +186,7 @@ const char *SBModule::GetUUIDString() const {
 }
 
 bool SBModule::operator==(const SBModule &rhs) const {
-  LLDB_RECORD_METHOD_CONST(bool, SBModule, operator==,(const lldb::SBModule &),
+  LLDB_RECORD_METHOD_CONST(bool, SBModule, operator==, (const lldb::SBModule &),
                            rhs);
 
   if (m_opaque_sp)
@@ -196,7 +195,7 @@ bool SBModule::operator==(const SBModule &rhs) const {
 }
 
 bool SBModule::operator!=(const SBModule &rhs) const {
-  LLDB_RECORD_METHOD_CONST(bool, SBModule, operator!=,(const lldb::SBModule &),
+  LLDB_RECORD_METHOD_CONST(bool, SBModule, operator!=, (const lldb::SBModule &),
                            rhs);
 
   if (m_opaque_sp)
@@ -625,7 +624,7 @@ uint32_t SBModule::GetVersion(uint32_t *versions, uint32_t num_versions) {
     ++result;
   if (version.getMinor())
     ++result;
-  if(version.getSubminor())
+  if (version.getSubminor())
     ++result;
 
   if (!versions)
@@ -693,6 +692,7 @@ uint32_t SBModule::GetNumberAllocatedModules() {
 void SBModule::GarbageCollectAllocatedModules() {
   LLDB_RECORD_STATIC_METHOD_NO_ARGS(void, SBModule,
                                     GarbageCollectAllocatedModules);
+
   const bool mandatory = false;
   ModuleList::RemoveOrphanSharedModules(mandatory);
 }
@@ -700,14 +700,13 @@ void SBModule::GarbageCollectAllocatedModules() {
 namespace lldb_private {
 namespace repro {
 
-template <>
-void RegisterMethods<SBModule>(Registry &R) {
+template <> void RegisterMethods<SBModule>(Registry &R) {
   LLDB_REGISTER_CONSTRUCTOR(SBModule, ());
   LLDB_REGISTER_CONSTRUCTOR(SBModule, (const lldb::SBModuleSpec &));
   LLDB_REGISTER_CONSTRUCTOR(SBModule, (const lldb::SBModule &));
   LLDB_REGISTER_CONSTRUCTOR(SBModule, (lldb::SBProcess &, lldb::addr_t));
-  LLDB_REGISTER_METHOD(const lldb::SBModule &,
-                       SBModule, operator=,(const lldb::SBModule &));
+  LLDB_REGISTER_METHOD(const lldb::SBModule &, SBModule, operator=,
+                       (const lldb::SBModule &));
   LLDB_REGISTER_METHOD_CONST(bool, SBModule, IsValid, ());
   LLDB_REGISTER_METHOD_CONST(bool, SBModule, operator bool, ());
   LLDB_REGISTER_METHOD(void, SBModule, Clear, ());
@@ -721,10 +720,10 @@ void RegisterMethods<SBModule>(Registry &R) {
   LLDB_REGISTER_METHOD(bool, SBModule, SetRemoteInstallFileSpec,
                        (lldb::SBFileSpec &));
   LLDB_REGISTER_METHOD_CONST(const char *, SBModule, GetUUIDString, ());
-  LLDB_REGISTER_METHOD_CONST(bool,
-                             SBModule, operator==,(const lldb::SBModule &));
-  LLDB_REGISTER_METHOD_CONST(bool,
-                             SBModule, operator!=,(const lldb::SBModule &));
+  LLDB_REGISTER_METHOD_CONST(bool, SBModule, operator==,
+                             (const lldb::SBModule &));
+  LLDB_REGISTER_METHOD_CONST(bool, SBModule, operator!=,
+                             (const lldb::SBModule &));
   LLDB_REGISTER_METHOD(lldb::SBAddress, SBModule, ResolveFileAddress,
                        (lldb::addr_t));
   LLDB_REGISTER_METHOD(lldb::SBSymbolContext, SBModule,
@@ -743,8 +742,7 @@ void RegisterMethods<SBModule>(Registry &R) {
   LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBModule, FindSymbols,
                        (const char *, lldb::SymbolType));
   LLDB_REGISTER_METHOD(size_t, SBModule, GetNumSections, ());
-  LLDB_REGISTER_METHOD(lldb::SBSection, SBModule, GetSectionAtIndex,
-                       (size_t));
+  LLDB_REGISTER_METHOD(lldb::SBSection, SBModule, GetSectionAtIndex, (size_t));
   LLDB_REGISTER_METHOD(lldb::SBSymbolContextList, SBModule, FindFunctions,
                        (const char *, uint32_t));
   LLDB_REGISTER_METHOD(lldb::SBValueList, SBModule, FindGlobalVariables,
@@ -752,28 +750,25 @@ void RegisterMethods<SBModule>(Registry &R) {
   LLDB_REGISTER_METHOD(lldb::SBValue, SBModule, FindFirstGlobalVariable,
                        (lldb::SBTarget &, const char *));
   LLDB_REGISTER_METHOD(lldb::SBType, SBModule, FindFirstType, (const char *));
-  LLDB_REGISTER_METHOD(lldb::SBType, SBModule, GetBasicType,
-                       (lldb::BasicType));
+  LLDB_REGISTER_METHOD(lldb::SBType, SBModule, GetBasicType, (lldb::BasicType));
   LLDB_REGISTER_METHOD(lldb::SBTypeList, SBModule, FindTypes, (const char *));
-  LLDB_REGISTER_METHOD(lldb::SBType, SBModule, GetTypeByID,
-                       (lldb::user_id_t));
+  LLDB_REGISTER_METHOD(lldb::SBType, SBModule, GetTypeByID, (lldb::user_id_t));
   LLDB_REGISTER_METHOD(lldb::SBTypeList, SBModule, GetTypes, (uint32_t));
-  LLDB_REGISTER_METHOD(lldb::SBSection, SBModule, FindSection,
-                       (const char *));
+  LLDB_REGISTER_METHOD(lldb::SBSection, SBModule, FindSection, (const char *));
   LLDB_REGISTER_METHOD(lldb::ByteOrder, SBModule, GetByteOrder, ());
   LLDB_REGISTER_METHOD(const char *, SBModule, GetTriple, ());
   LLDB_REGISTER_METHOD(uint32_t, SBModule, GetAddressByteSize, ());
-  LLDB_REGISTER_METHOD(uint32_t, SBModule, GetVersion,
-                       (uint32_t *, uint32_t));
-  LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetSymbolFileSpec,
-                             ());
+  LLDB_REGISTER_METHOD(uint32_t, SBModule, GetVersion, (uint32_t *, uint32_t));
+  LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetSymbolFileSpec, ());
   LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBModule,
                              GetObjectFileHeaderAddress, ());
   LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBModule,
                              GetObjectFileEntryPointAddress, ());
   LLDB_REGISTER_STATIC_METHOD(uint32_t, SBModule, GetNumberAllocatedModules,
                               ());
+  LLDB_REGISTER_STATIC_METHOD(void, SBModule, GarbageCollectAllocatedModules,
+                              ());
 }
 
-}
-}
+} // namespace repro
+} // namespace lldb_private


        


More information about the lldb-commits mailing list