xiaobai updated this revision to Diff 189603.
xiaobai added a comment.

Group function registrations to cut down on ifdefs


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59056/new/

https://reviews.llvm.org/D59056

Files:
  source/API/SBReproducer.cpp

Index: source/API/SBReproducer.cpp
===================================================================
--- source/API/SBReproducer.cpp
+++ source/API/SBReproducer.cpp
@@ -818,12 +818,14 @@
                          ());
     LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBDebugger, GetFormatForType,
                          (lldb::SBTypeNameSpecifier));
+#ifndef LLDB_DISABLE_PYTHON
     LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBDebugger, GetSummaryForType,
                          (lldb::SBTypeNameSpecifier));
-    LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBDebugger, GetFilterForType,
-                         (lldb::SBTypeNameSpecifier));
     LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBDebugger, GetSyntheticForType,
                          (lldb::SBTypeNameSpecifier));
+#endif
+    LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBDebugger, GetFilterForType,
+                         (lldb::SBTypeNameSpecifier));
     LLDB_REGISTER_METHOD(bool, SBDebugger, EnableLog,
                          (const char *, const char **));
   }
@@ -2436,47 +2438,49 @@
     LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumFormats, ());
     LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumSummaries, ());
     LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumFilters, ());
+#ifndef LLDB_DISABLE_PYTHON
     LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumSynthetics, ());
-    LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
-                         GetTypeNameSpecifierForFilterAtIndex, (uint32_t));
-    LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
-                         GetTypeNameSpecifierForFormatAtIndex, (uint32_t));
-    LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
-                         GetTypeNameSpecifierForSummaryAtIndex, (uint32_t));
     LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
                          GetTypeNameSpecifierForSyntheticAtIndex, (uint32_t));
-    LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterForType,
-                         (lldb::SBTypeNameSpecifier));
-    LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatForType,
-                         (lldb::SBTypeNameSpecifier));
     LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBTypeCategory, GetSummaryForType,
                          (lldb::SBTypeNameSpecifier));
     LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBTypeCategory,
                          GetSyntheticForType, (lldb::SBTypeNameSpecifier));
     LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterAtIndex,
                          (uint32_t));
-    LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatAtIndex,
-                         (uint32_t));
     LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBTypeCategory, GetSummaryAtIndex,
                          (uint32_t));
     LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBTypeCategory,
                          GetSyntheticAtIndex, (uint32_t));
+    LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSummary,
+                         (lldb::SBTypeNameSpecifier, lldb::SBTypeSummary));
+    LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSynthetic,
+                         (lldb::SBTypeNameSpecifier, lldb::SBTypeSynthetic));
+    LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeSynthetic,
+                         (lldb::SBTypeNameSpecifier));
+#endif
+    LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
+                         GetTypeNameSpecifierForFilterAtIndex, (uint32_t));
+    LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
+                         GetTypeNameSpecifierForFormatAtIndex, (uint32_t));
+    LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
+                         GetTypeNameSpecifierForSummaryAtIndex, (uint32_t));
+    LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterForType,
+                         (lldb::SBTypeNameSpecifier));
+    LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatForType,
+                         (lldb::SBTypeNameSpecifier));
+    LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatAtIndex,
+                         (uint32_t));
     LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeFormat,
                          (lldb::SBTypeNameSpecifier, lldb::SBTypeFormat));
     LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeFormat,
                          (lldb::SBTypeNameSpecifier));
-    LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSummary,
-                         (lldb::SBTypeNameSpecifier, lldb::SBTypeSummary));
     LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeSummary,
                          (lldb::SBTypeNameSpecifier));
     LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeFilter,
                          (lldb::SBTypeNameSpecifier, lldb::SBTypeFilter));
     LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeFilter,
                          (lldb::SBTypeNameSpecifier));
-    LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSynthetic,
-                         (lldb::SBTypeNameSpecifier, lldb::SBTypeSynthetic));
-    LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeSynthetic,
-                         (lldb::SBTypeNameSpecifier));
     LLDB_REGISTER_METHOD(bool, SBTypeCategory, GetDescription,
                          (lldb::SBStream &, lldb::DescriptionLevel));
     LLDB_REGISTER_METHOD(
@@ -2628,6 +2632,7 @@
     LLDB_REGISTER_METHOD(bool,
                          SBTypeSummary, operator!=,(lldb::SBTypeSummary &));
   }
+#ifndef LLDB_DISABLE_PYTHON
   {
     LLDB_REGISTER_CONSTRUCTOR(SBTypeSynthetic, ());
     LLDB_REGISTER_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic,
@@ -2655,6 +2660,7 @@
     LLDB_REGISTER_METHOD(bool,
                          SBTypeSynthetic, operator!=,(lldb::SBTypeSynthetic &));
   }
+#endif
   {
     LLDB_REGISTER_CONSTRUCTOR(SBUnixSignals, ());
     LLDB_REGISTER_CONSTRUCTOR(SBUnixSignals, (const lldb::SBUnixSignals &));
@@ -2710,7 +2716,9 @@
     LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBValue, GetTypeFormat, ());
     LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBValue, GetTypeSummary, ());
     LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBValue, GetTypeFilter, ());
+#ifndef LLDB_DISABLE_PYTHON
     LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBValue, GetTypeSynthetic, ());
+#endif
     LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, CreateChildAtOffset,
                          (const char *, uint32_t, lldb::SBType));
     LLDB_REGISTER_METHOD(lldb::SBValue, SBValue, Cast, (lldb::SBType));
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to