summaryrefslogtreecommitdiff
path: root/pstl
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-04-10 18:52:24 +0000
committerLouis Dionne <ldionne@apple.com>2019-04-10 18:52:24 +0000
commite3e24ad25fb1df489518d83550cde0a40c7c562c (patch)
treea4e9a996804d9165fd5c3e89ad25381d249d3542 /pstl
parent59a0e047015b5f63f1d21c9fb2525348748a947c (diff)
downloadllvm-e3e24ad25fb1df489518d83550cde0a40c7c562c.tar.gz
Fix header inclusion order failures
Summary: See https://bugs.llvm.org/show_bug.cgi?id=41432 Subscribers: libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60525 llvm-svn: 358121
Diffstat (limited to 'pstl')
-rw-r--r--pstl/include/pstl/internal/glue_algorithm_defs.h1
-rw-r--r--pstl/include/pstl/internal/glue_algorithm_impl.h2
-rw-r--r--pstl/include/pstl/internal/glue_memory_impl.h3
-rw-r--r--pstl/include/pstl/internal/glue_numeric_defs.h2
-rw-r--r--pstl/include/pstl/internal/glue_numeric_impl.h1
-rw-r--r--pstl/test/pstl/header_inclusion_order_algorithm_0.pass.cpp24
-rw-r--r--pstl/test/pstl/header_inclusion_order_algorithm_1.pass.cpp24
-rw-r--r--pstl/test/pstl/header_inclusion_order_memory_0.pass.cpp24
-rw-r--r--pstl/test/pstl/header_inclusion_order_memory_1.pass.cpp24
-rw-r--r--pstl/test/pstl/header_inclusion_order_numeric_0.pass.cpp24
-rw-r--r--pstl/test/pstl/header_inclusion_order_numeric_1.pass.cpp24
11 files changed, 153 insertions, 0 deletions
diff --git a/pstl/include/pstl/internal/glue_algorithm_defs.h b/pstl/include/pstl/internal/glue_algorithm_defs.h
index c622ed3a762e..14faaaeab535 100644
--- a/pstl/include/pstl/internal/glue_algorithm_defs.h
+++ b/pstl/include/pstl/internal/glue_algorithm_defs.h
@@ -11,6 +11,7 @@
#define __PSTL_glue_algorithm_defs_H
#include <functional>
+#include <iterator>
#include "execution_defs.h"
diff --git a/pstl/include/pstl/internal/glue_algorithm_impl.h b/pstl/include/pstl/internal/glue_algorithm_impl.h
index 2e0b818b7185..56c1194d8e2b 100644
--- a/pstl/include/pstl/internal/glue_algorithm_impl.h
+++ b/pstl/include/pstl/internal/glue_algorithm_impl.h
@@ -17,6 +17,8 @@
#include "algorithm_fwd.h"
#include "numeric_fwd.h" /* count and count_if use __pattern_transform_reduce */
+#include "execution_impl.h"
+
namespace std
{
diff --git a/pstl/include/pstl/internal/glue_memory_impl.h b/pstl/include/pstl/internal/glue_memory_impl.h
index 4cde9bac51c5..9798b80c8ace 100644
--- a/pstl/include/pstl/internal/glue_memory_impl.h
+++ b/pstl/include/pstl/internal/glue_memory_impl.h
@@ -10,9 +10,12 @@
#ifndef __PSTL_glue_memory_impl_H
#define __PSTL_glue_memory_impl_H
+#include "execution_defs.h"
#include "utils.h"
#include "algorithm_fwd.h"
+#include "execution_impl.h"
+
namespace std
{
diff --git a/pstl/include/pstl/internal/glue_numeric_defs.h b/pstl/include/pstl/internal/glue_numeric_defs.h
index 55187f1f6ea2..03d06c9d0aeb 100644
--- a/pstl/include/pstl/internal/glue_numeric_defs.h
+++ b/pstl/include/pstl/internal/glue_numeric_defs.h
@@ -10,6 +10,8 @@
#ifndef __PSTL_glue_numeric_defs_H
#define __PSTL_glue_numeric_defs_H
+#include <iterator>
+
#include "execution_defs.h"
namespace std
diff --git a/pstl/include/pstl/internal/glue_numeric_impl.h b/pstl/include/pstl/internal/glue_numeric_impl.h
index bde0b03f3fb1..c462891e104c 100644
--- a/pstl/include/pstl/internal/glue_numeric_impl.h
+++ b/pstl/include/pstl/internal/glue_numeric_impl.h
@@ -14,6 +14,7 @@
#include "utils.h"
#include "numeric_fwd.h"
+#include "execution_impl.h"
namespace std
{
diff --git a/pstl/test/pstl/header_inclusion_order_algorithm_0.pass.cpp b/pstl/test/pstl/header_inclusion_order_algorithm_0.pass.cpp
new file mode 100644
index 000000000000..0b0d79b5b237
--- /dev/null
+++ b/pstl/test/pstl/header_inclusion_order_algorithm_0.pass.cpp
@@ -0,0 +1,24 @@
+// -*- C++ -*-
+//===-- header_inclusion_order_algorithm_0.pass.cpp -----------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
+#include "pstl/execution"
+#include "pstl/algorithm"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+int32_t
+main()
+{
+ return 0;
+}
diff --git a/pstl/test/pstl/header_inclusion_order_algorithm_1.pass.cpp b/pstl/test/pstl/header_inclusion_order_algorithm_1.pass.cpp
new file mode 100644
index 000000000000..e346a3bc6bab
--- /dev/null
+++ b/pstl/test/pstl/header_inclusion_order_algorithm_1.pass.cpp
@@ -0,0 +1,24 @@
+// -*- C++ -*-
+//===-- header_inclusion_order_algorithm_1.pass.cpp -----------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
+#include "pstl/algorithm"
+#include "pstl/execution"
+#else
+#include <algorithm>
+#include <execution>
+#endif // PSTL_STANDALONE_TESTS
+
+int32_t
+main()
+{
+ return 0;
+}
diff --git a/pstl/test/pstl/header_inclusion_order_memory_0.pass.cpp b/pstl/test/pstl/header_inclusion_order_memory_0.pass.cpp
new file mode 100644
index 000000000000..1a8a117ac586
--- /dev/null
+++ b/pstl/test/pstl/header_inclusion_order_memory_0.pass.cpp
@@ -0,0 +1,24 @@
+// -*- C++ -*-
+//===-- header_inclusion_order_memory_0.pass.cpp --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
+#include "pstl/execution"
+#include "pstl/memory"
+#else
+#include <execution>
+#include <memory>
+#endif // PSTL_STANDALONE_TESTS
+
+int32_t
+main()
+{
+ return 0;
+}
diff --git a/pstl/test/pstl/header_inclusion_order_memory_1.pass.cpp b/pstl/test/pstl/header_inclusion_order_memory_1.pass.cpp
new file mode 100644
index 000000000000..2e3432370423
--- /dev/null
+++ b/pstl/test/pstl/header_inclusion_order_memory_1.pass.cpp
@@ -0,0 +1,24 @@
+// -*- C++ -*-
+//===-- header_inclusion_order_memory_1.pass.cpp --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
+#include "pstl/memory"
+#include "pstl/execution"
+#else
+#include <memory>
+#include <execution>
+#endif // PSTL_STANDALONE_TESTS
+
+int32_t
+main()
+{
+ return 0;
+}
diff --git a/pstl/test/pstl/header_inclusion_order_numeric_0.pass.cpp b/pstl/test/pstl/header_inclusion_order_numeric_0.pass.cpp
new file mode 100644
index 000000000000..1ff596eee512
--- /dev/null
+++ b/pstl/test/pstl/header_inclusion_order_numeric_0.pass.cpp
@@ -0,0 +1,24 @@
+// -*- C++ -*-
+//===-- header_inclusion_order_numeric_0.pass.cpp -------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
+#include "pstl/execution"
+#include "pstl/numeric"
+#else
+#include <execution>
+#include <numeric>
+#endif // PSTL_STANDALONE_TESTS
+
+int32_t
+main()
+{
+ return 0;
+}
diff --git a/pstl/test/pstl/header_inclusion_order_numeric_1.pass.cpp b/pstl/test/pstl/header_inclusion_order_numeric_1.pass.cpp
new file mode 100644
index 000000000000..3c5b8cf8989f
--- /dev/null
+++ b/pstl/test/pstl/header_inclusion_order_numeric_1.pass.cpp
@@ -0,0 +1,24 @@
+// -*- C++ -*-
+//===-- header_inclusion_order_numeric_0.pass.cpp -------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
+#include "pstl/numeric"
+#include "pstl/execution"
+#else
+#include <numeric>
+#include <execution>
+#endif // PSTL_STANDALONE_TESTS
+
+int32_t
+main()
+{
+ return 0;
+}