Moved #include for lldb-python.h to a distinct group with a reminder comment
authorKate Stone <katherine.stone@apple.com>
Fri, 19 Aug 2016 20:44:07 +0000 (20:44 +0000)
committerKate Stone <katherine.stone@apple.com>
Fri, 19 Aug 2016 20:44:07 +0000 (20:44 +0000)
declaring that it must be first.  Failure to do so results in build failures
on macOS due to subtle header conflicts.

llvm-svn: 279315

lldb/.clang-format
lldb/packages/Python/lldbsuite/.clang-format [new file with mode: 0644]
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

index c698dc5..9b3aa8b 100644 (file)
@@ -1,9 +1 @@
 BasedOnStyle: LLVM
-IndentWidth:     4
-ColumnLimit:     120
-BreakBeforeBraces: Allman
-AlwaysBreakAfterReturnType: All
-AllowShortFunctionsOnASingleLine: Inline
-ConstructorInitializerAllOnOneLineOrOnePerLine: true
-IndentCaseLabels: true
-AccessModifierOffset: -4
diff --git a/lldb/packages/Python/lldbsuite/.clang-format b/lldb/packages/Python/lldbsuite/.clang-format
new file mode 100644 (file)
index 0000000..7de7a51
--- /dev/null
@@ -0,0 +1,4 @@
+DisableFormat: true
+
+# Disabling formatting doesn't implicitly disable include sorting
+SortIncludes: false
index 16e106d..1f03de8 100644 (file)
 
 #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"
index 2cbd85b..10de1d1 100644 (file)
@@ -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"
index 23075e1..5e010bc 100644 (file)
@@ -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"