summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorAlex Langford <apl@fb.com>2019-03-07 01:02:55 +0000
committerAlex Langford <apl@fb.com>2019-03-07 01:02:55 +0000
commit03df653f7142cd259a43b265bcaa32f46ec8a1a3 (patch)
tree83ebb703322756e334b5dddb05d69d604122defa /lldb/source/API
parentc56d2afc63540f2e85fee98617bea8d63bc713d4 (diff)
downloadbcm5719-llvm-03df653f7142cd259a43b265bcaa32f46ec8a1a3.tar.gz
bcm5719-llvm-03df653f7142cd259a43b265bcaa32f46ec8a1a3.zip
Repair the build when LLDB_DISABLE_PYTHON is set
Summary: If LLDB_DISABLE_PYTHON is set, some functions are unavailable but SBReproducer assumes they are. Let's conditionally register those functions since they are conditionally declared. Differential Revision: https://reviews.llvm.org/D59056 llvm-svn: 355575
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBReproducer.cpp48
1 files changed, 28 insertions, 20 deletions
diff --git a/lldb/source/API/SBReproducer.cpp b/lldb/source/API/SBReproducer.cpp
index 63145fc6736..05a8a5ff9a3 100644
--- a/lldb/source/API/SBReproducer.cpp
+++ b/lldb/source/API/SBReproducer.cpp
@@ -818,12 +818,14 @@ SBRegistry::SBRegistry() {
());
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 @@ SBRegistry::SBRegistry() {
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 @@ SBRegistry::SBRegistry() {
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 @@ SBRegistry::SBRegistry() {
LLDB_REGISTER_METHOD(bool,
SBTypeSynthetic, operator!=,(lldb::SBTypeSynthetic &));
}
+#endif
{
LLDB_REGISTER_CONSTRUCTOR(SBUnixSignals, ());
LLDB_REGISTER_CONSTRUCTOR(SBUnixSignals, (const lldb::SBUnixSignals &));
@@ -2710,7 +2716,9 @@ SBRegistry::SBRegistry() {
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));
OpenPOWER on IntegriCloud