[libcxx-commits] [libcxx] [NFC] Use explicit #include instead of transitive #include (PR #115420)
Peng Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 8 05:53:27 PST 2024
https://github.com/winner245 updated https://github.com/llvm/llvm-project/pull/115420
>From 21d89ca4b83c26137c4b2710ff77fcd8fdb80ba6 Mon Sep 17 00:00:00 2001
From: Peng Liu <winner245 at hotmail.com>
Date: Thu, 7 Nov 2024 23:28:41 -0500
Subject: [PATCH 1/3] Use explicit #include instead of transitive #include
---
libcxx/test/benchmarks/vector_operations.bench.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/libcxx/test/benchmarks/vector_operations.bench.cpp b/libcxx/test/benchmarks/vector_operations.bench.cpp
index b0dffe35ec6e14..119f9e16dadc6e 100644
--- a/libcxx/test/benchmarks/vector_operations.bench.cpp
+++ b/libcxx/test/benchmarks/vector_operations.bench.cpp
@@ -14,6 +14,7 @@
#include <deque>
#include <functional>
#include <vector>
+#include <memory>
#include "benchmark/benchmark.h"
>From fafa5f62fa8647b9d17b82a20a51374bcfb2e72b Mon Sep 17 00:00:00 2001
From: Peng Liu <winner245 at hotmail.com>
Date: Fri, 8 Nov 2024 01:05:53 -0500
Subject: [PATCH 2/3] Add #include <string>
---
libcxx/test/benchmarks/vector_operations.bench.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/libcxx/test/benchmarks/vector_operations.bench.cpp b/libcxx/test/benchmarks/vector_operations.bench.cpp
index 119f9e16dadc6e..a7bf42b4988324 100644
--- a/libcxx/test/benchmarks/vector_operations.bench.cpp
+++ b/libcxx/test/benchmarks/vector_operations.bench.cpp
@@ -14,6 +14,7 @@
#include <deque>
#include <functional>
#include <vector>
+#include <string>
#include <memory>
#include "benchmark/benchmark.h"
>From 9c721f175622298afa5cf9e9ea981347f2e2e43a Mon Sep 17 00:00:00 2001
From: Peng Liu <winner245 at hotmail.com>
Date: Fri, 8 Nov 2024 08:51:09 -0500
Subject: [PATCH 3/3] Adjust order of headers
---
libcxx/test/benchmarks/vector_operations.bench.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcxx/test/benchmarks/vector_operations.bench.cpp b/libcxx/test/benchmarks/vector_operations.bench.cpp
index a7bf42b4988324..ce8ab233fc9817 100644
--- a/libcxx/test/benchmarks/vector_operations.bench.cpp
+++ b/libcxx/test/benchmarks/vector_operations.bench.cpp
@@ -13,9 +13,9 @@
#include <cstring>
#include <deque>
#include <functional>
-#include <vector>
-#include <string>
#include <memory>
+#include <string>
+#include <vector>
#include "benchmark/benchmark.h"
More information about the libcxx-commits
mailing list