[Lldb-commits] [lldb] r279315 - Moved #include for lldb-python.h to a distinct group with a reminder comment

Kate Stone via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 19 13:44:07 PDT 2016


Author: kate
Date: Fri Aug 19 15:44:07 2016
New Revision: 279315

URL: http://llvm.org/viewvc/llvm-project?rev=279315&view=rev
Log:
Moved #include for lldb-python.h to a distinct group with a reminder comment
declaring that it must be first.  Failure to do so results in build failures
on macOS due to subtle header conflicts.


Added:
    lldb/trunk/packages/Python/lldbsuite/.clang-format
Modified:
    lldb/trunk/.clang-format
    lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
    lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
    lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Modified: lldb/trunk/.clang-format
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/.clang-format?rev=279315&r1=279314&r2=279315&view=diff
==============================================================================
--- lldb/trunk/.clang-format (original)
+++ lldb/trunk/.clang-format Fri Aug 19 15:44:07 2016
@@ -1,9 +1 @@
 BasedOnStyle: LLVM
-IndentWidth:     4
-ColumnLimit:     120
-BreakBeforeBraces: Allman
-AlwaysBreakAfterReturnType: All
-AllowShortFunctionsOnASingleLine: Inline
-ConstructorInitializerAllOnOneLineOrOnePerLine: true
-IndentCaseLabels: true
-AccessModifierOffset: -4

Added: lldb/trunk/packages/Python/lldbsuite/.clang-format
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/.clang-format?rev=279315&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/.clang-format (added)
+++ lldb/trunk/packages/Python/lldbsuite/.clang-format Fri Aug 19 15:44:07 2016
@@ -0,0 +1,4 @@
+DisableFormat: true
+
+# Disabling formatting doesn't implicitly disable include sorting
+SortIncludes: false

Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h?rev=279315&r1=279314&r2=279315&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h Fri Aug 19 15:44:07 2016
@@ -12,11 +12,13 @@
 
 #ifndef LLDB_DISABLE_PYTHON
 
+// LLDB Python header must be included first
+#include "lldb-python.h"
+
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb-python.h"
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Flags.h"
 #include "lldb/Core/StructuredData.h"

Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp?rev=279315&r1=279314&r2=279315&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp Fri Aug 19 15:44:07 2016
@@ -9,7 +9,9 @@
 
 #ifndef LLDB_DISABLE_PYTHON
 
+// LLDB Python header must be included first
 #include "lldb-python.h"
+
 #include "PythonExceptionState.h"
 
 #include "llvm/ADT/StringRef.h"

Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=279315&r1=279314&r2=279315&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Fri Aug 19 15:44:07 2016
@@ -13,7 +13,9 @@
 
 #else
 
+// LLDB Python header must be included first
 #include "lldb-python.h"
+
 #include "ScriptInterpreterPython.h"
 #include "PythonDataObjects.h"
 #include "PythonExceptionState.h"




More information about the lldb-commits mailing list