summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-08-19 20:44:07 +0000
committerKate Stone <katherine.stone@apple.com>2016-08-19 20:44:07 +0000
commit41de9a9791370e9af19720664e00ff322ba526e5 (patch)
tree75893a46b2a1b9fdfc34a25daa3ad91b47f469ef
parent64093a35fff3a533d312604bb6ab558933b30e6a (diff)
downloadbcm5719-llvm-41de9a9791370e9af19720664e00ff322ba526e5.tar.gz
bcm5719-llvm-41de9a9791370e9af19720664e00ff322ba526e5.zip
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. llvm-svn: 279315
-rw-r--r--lldb/.clang-format8
-rw-r--r--lldb/packages/Python/lldbsuite/.clang-format4
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h4
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp2
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp2
5 files changed, 11 insertions, 9 deletions
diff --git a/lldb/.clang-format b/lldb/.clang-format
index c698dc5d99c..9b3aa8b7213 100644
--- a/lldb/.clang-format
+++ b/lldb/.clang-format
@@ -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
index 00000000000..7de7a512ad7
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/.clang-format
@@ -0,0 +1,4 @@
+DisableFormat: true
+
+# Disabling formatting doesn't implicitly disable include sorting
+SortIncludes: false
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
index 16e106d2d23..1f03de892e6 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
@@ -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"
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
index 2cbd85bfa11..10de1d11744 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
@@ -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"
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 23075e1bf55..5e010bc8c32 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -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"
OpenPOWER on IntegriCloud