Patch Enrico's changes from r150558 on 2012-02-14 to build even if Python
is not available (LLDB_DISABLE_PYTHON is defined).

Change build-swig-Python.sh to emit an empty LLDBPythonWrap.cpp file if 
this build is LLDB_DISABLE_PYTHON.

Change the "Copy to Xcode.app" shell script phase in the lldb.xcodeproj
to only do this copying for Mac native builds.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151035 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index 8150cb0..6628c1a 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -1135,6 +1135,7 @@
     return SBTypeFormat();
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 SBTypeSummary
 SBDebugger::GetSummaryForType (SBTypeNameSpecifier type_name)
 {
@@ -1158,6 +1159,7 @@
     }
     return summary_chosen;
 }
+#endif // LLDB_DISABLE_PYTHON
 
 SBTypeFilter
 SBDebugger::GetFilterForType (SBTypeNameSpecifier type_name)
@@ -1183,6 +1185,7 @@
     return filter_chosen;
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 SBTypeSynthetic
 SBDebugger::GetSyntheticForType (SBTypeNameSpecifier type_name)
 {
@@ -1206,6 +1209,7 @@
     }
     return synth_chosen;
 }
+#endif // LLDB_DISABLE_PYTHON
 
 bool
 SBDebugger::EnableLog (const char *channel, const char **categories)
diff --git a/source/API/SBFrame.cpp b/source/API/SBFrame.cpp
index eaf4f8a..8931e70 100644
--- a/source/API/SBFrame.cpp
+++ b/source/API/SBFrame.cpp
@@ -979,7 +979,8 @@
         expr_result.SetSP(expr_value_sp);
         Host::SetCrashDescription (NULL);
     }
-    
+
+#ifndef LLDB_DISABLE_PYTHON
     if (expr_log)
         expr_log->Printf("** [SBFrame::EvaluateExpression] Expression result is %s, summary %s **", 
                          expr_result.GetValue(), 
@@ -991,6 +992,7 @@
                      expr, 
                      expr_value_sp.get(),
                      exe_results);
+#endif
 
     return expr_result;
 }
diff --git a/source/API/SBTypeCategory.cpp b/source/API/SBTypeCategory.cpp
index b76f844..1543b5e 100644
--- a/source/API/SBTypeCategory.cpp
+++ b/source/API/SBTypeCategory.cpp
@@ -104,6 +104,7 @@
     return m_opaque_sp->GetFilterNavigator()->GetCount() + m_opaque_sp->GetRegexFilterNavigator()->GetCount();
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 uint32_t
 SBTypeCategory::GetNumSynthetics ()
 {
@@ -111,6 +112,7 @@
         return 0;
     return m_opaque_sp->GetSyntheticNavigator()->GetCount() + m_opaque_sp->GetRegexSyntheticNavigator()->GetCount();
 }
+#endif
 
 lldb::SBTypeNameSpecifier
 SBTypeCategory::GetTypeNameSpecifierForFilterAtIndex (uint32_t index)
@@ -136,6 +138,7 @@
     return SBTypeNameSpecifier(m_opaque_sp->GetTypeNameSpecifierForSummaryAtIndex(index));
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::SBTypeNameSpecifier
 SBTypeCategory::GetTypeNameSpecifierForSyntheticAtIndex (uint32_t index)
 {
@@ -143,6 +146,7 @@
         return SBTypeNameSpecifier();
     return SBTypeNameSpecifier(m_opaque_sp->GetTypeNameSpecifierForSyntheticAtIndex(index));
 }
+#endif
 
 SBTypeFilter
 SBTypeCategory::GetFilterForType (SBTypeNameSpecifier spec)
@@ -183,6 +187,7 @@
     return SBTypeFormat(DataVisualization::ValueFormats::GetFormat(ConstString(spec.GetName())));
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 SBTypeSummary
 SBTypeCategory::GetSummaryForType (SBTypeNameSpecifier spec)
 {
@@ -204,7 +209,9 @@
     
     return lldb::SBTypeSummary(summary_sp);
 }
+#endif // LLDB_DISABLE_PYTHON
 
+#ifndef LLDB_DISABLE_PYTHON
 SBTypeSynthetic
 SBTypeCategory::GetSyntheticForType (SBTypeNameSpecifier spec)
 {
@@ -228,7 +235,9 @@
     
     return lldb::SBTypeSynthetic(synth_sp);
 }
+#endif
 
+#ifndef LLDB_DISABLE_PYTHON
 SBTypeFilter
 SBTypeCategory::GetFilterAtIndex (uint32_t index)
 {
@@ -243,6 +252,7 @@
     
     return lldb::SBTypeFilter(filter_sp);
 }
+#endif
 
 SBTypeFormat
 SBTypeCategory::GetFormatAtIndex (uint32_t index)
@@ -252,6 +262,7 @@
     return SBTypeFormat(DataVisualization::ValueFormats::GetFormatAtIndex((index)));
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 SBTypeSummary
 SBTypeCategory::GetSummaryAtIndex (uint32_t index)
 {
@@ -259,7 +270,9 @@
         return SBTypeSummary();
     return SBTypeSummary(m_opaque_sp->GetSummaryAtIndex((index)));
 }
+#endif
 
+#ifndef LLDB_DISABLE_PYTHON
 SBTypeSynthetic
 SBTypeCategory::GetSyntheticAtIndex (uint32_t index)
 {
@@ -274,6 +287,7 @@
     
     return lldb::SBTypeSynthetic(synth_sp);
 }
+#endif
 
 bool
 SBTypeCategory::AddTypeFormat (SBTypeNameSpecifier type_name,
@@ -311,6 +325,7 @@
     return DataVisualization::ValueFormats::Delete(ConstString(type_name.GetName()));
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 bool
 SBTypeCategory::AddTypeSummary (SBTypeNameSpecifier type_name,
                                 SBTypeSummary summary)
@@ -365,6 +380,7 @@
     
     return true;
 }
+#endif
 
 bool
 SBTypeCategory::DeleteTypeSummary (SBTypeNameSpecifier type_name)
@@ -417,6 +433,7 @@
         return m_opaque_sp->GetFilterNavigator()->Delete(ConstString(type_name.GetName()));
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 bool
 SBTypeCategory::AddTypeSynthetic (SBTypeNameSpecifier type_name,
                                   SBTypeSynthetic synth)
@@ -486,6 +503,7 @@
     else
         return m_opaque_sp->GetSyntheticNavigator()->Delete(ConstString(type_name.GetName()));
 }
+#endif // LLDB_DISABLE_PYTHON
 
 bool
 SBTypeCategory::GetDescription (lldb::SBStream &description, 
diff --git a/source/API/SBTypeSummary.cpp b/source/API/SBTypeSummary.cpp
index 5edff66..86cb89b 100644
--- a/source/API/SBTypeSummary.cpp
+++ b/source/API/SBTypeSummary.cpp
@@ -16,6 +16,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
+#ifndef LLDB_DISABLE_PYTHON
+
 SBTypeSummary::SBTypeSummary() :
 m_opaque_sp()
 {
@@ -296,3 +298,5 @@
     
     return true;
 }
+
+#endif // LLDB_DISABLE_PYTHON
diff --git a/source/API/SBTypeSynthetic.cpp b/source/API/SBTypeSynthetic.cpp
index 66e2d8b..647f2d8 100644
--- a/source/API/SBTypeSynthetic.cpp
+++ b/source/API/SBTypeSynthetic.cpp
@@ -16,6 +16,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
+#ifndef LLDB_DISABLE_PYTHON
+
 SBTypeSynthetic::SBTypeSynthetic() :
 m_opaque_sp()
 {
@@ -201,3 +203,5 @@
     
     return true;
 }
+
+#endif // LLDB_DISABLE_PYTHON
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index d4d2c06..9818eb3 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -310,6 +310,7 @@
     return result;
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 const char *
 SBValue::GetSummary ()
 {
@@ -334,6 +335,7 @@
     }
     return cstr;
 }
+#endif // LLDB_DISABLE_PYTHON
 
 const char *
 SBValue::GetLocation ()
@@ -399,6 +401,7 @@
     return format;
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::SBTypeSummary
 SBValue::GetTypeSummary ()
 {
@@ -420,6 +423,7 @@
     }
     return summary;
 }
+#endif // LLDB_DISABLE_PYTHON
 
 lldb::SBTypeFilter
 SBValue::GetTypeFilter ()
@@ -447,6 +451,7 @@
     return filter;
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::SBTypeSynthetic
 SBValue::GetTypeSynthetic ()
 {
@@ -472,6 +477,7 @@
     }
     return synthetic;
 }
+#endif
 
 lldb::SBValue
 SBValue::CreateChildAtOffset (const char *name, uint32_t offset, SBType type)