Skip to content

Commit

Permalink
Revert "Revert using Abseil system includes. (#4594)"
Browse files Browse the repository at this point in the history
This reverts commit a0520c8.
  • Loading branch information
fruffy committed Apr 29, 2024
1 parent f32cb7c commit bb95bee
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --action_env=BAZEL_CXXOPTS="-std=c++17"
build --action_env=BAZEL_CXXOPTS="-std=c++17" --features=external_include_paths
3 changes: 2 additions & 1 deletion backends/p4tools/modules/testgen/test/small-step/util.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "util.h"

#include <absl/strings/substitute.h>

#include <string>

#include "absl/strings/substitute.h"
#include "test/gtest/helpers.h"

#include "backends/p4tools/modules/testgen/test/gtest_utils.h"
Expand Down
2 changes: 1 addition & 1 deletion bazel/example/.bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --action_env=BAZEL_CXXOPTS="-std=c++17"
build --action_env=BAZEL_CXXOPTS="-std=c++17" --features=external_include_paths
3 changes: 2 additions & 1 deletion control-plane/p4RuntimeSymbolTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ limitations under the License.
*/
#include "p4RuntimeSymbolTable.h"

#include "absl/strings/str_split.h"
#include <absl/strings/str_split.h>

#include "lib/cstring.h"
#include "lib/iterator_range.h"
#include "p4RuntimeArchHandler.h"
Expand Down
5 changes: 3 additions & 2 deletions frontends/common/resolveReferences/referenceMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ limitations under the License.
#ifndef COMMON_RESOLVEREFERENCES_REFERENCEMAP_H_
#define COMMON_RESOLVEREFERENCES_REFERENCEMAP_H_

#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include <absl/container/flat_hash_map.h>
#include <absl/container/flat_hash_set.h>

#include "frontends/common/programMap.h"
#include "ir/ir.h"
#include "ir/visitor.h"
Expand Down
3 changes: 2 additions & 1 deletion frontends/common/resolveReferences/resolveReferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ limitations under the License.
#ifndef COMMON_RESOLVEREFERENCES_RESOLVEREFERENCES_H_
#define COMMON_RESOLVEREFERENCES_RESOLVEREFERENCES_H_

#include "absl/container/flat_hash_map.h"
#include <absl/container/flat_hash_map.h>

#include "ir/ir.h"
#include "lib/cstring.h"
#include "lib/iterator_range.h"
Expand Down
5 changes: 3 additions & 2 deletions frontends/p4/def_use.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ limitations under the License.
#ifndef FRONTENDS_P4_DEF_USE_H_
#define FRONTENDS_P4_DEF_USE_H_

#include "absl/container/flat_hash_set.h"
#include "absl/container/inlined_vector.h"
#include <absl/container/flat_hash_set.h>
#include <absl/container/inlined_vector.h>

#include "frontends/common/resolveReferences/referenceMap.h"
#include "ir/ir.h"
#include "lib/alloc_trace.h"
Expand Down
3 changes: 2 additions & 1 deletion frontends/p4/simplifyDefUse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ limitations under the License.

#include "simplifyDefUse.h"

#include "absl/container/flat_hash_set.h"
#include <absl/container/flat_hash_set.h>

#include "frontends/p4/def_use.h"
#include "frontends/p4/methodInstance.h"
#include "frontends/p4/parserCallGraph.h"
Expand Down
7 changes: 4 additions & 3 deletions frontends/p4/typeChecking/typeConstraints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ limitations under the License.

#include "typeConstraints.h"

#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
#include "absl/strings/str_split.h"
#include <absl/strings/str_cat.h>
#include <absl/strings/str_join.h>
#include <absl/strings/str_split.h>

#include "typeUnification.h"

namespace P4 {
Expand Down
5 changes: 3 additions & 2 deletions frontends/p4/typeMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ limitations under the License.
#ifndef FRONTENDS_P4_TYPEMAP_H_
#define FRONTENDS_P4_TYPEMAP_H_

#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include <absl/container/flat_hash_map.h>
#include <absl/container/flat_hash_set.h>

#include "frontends/common/programMap.h"
#include "frontends/p4/typeChecking/typeSubstitution.h"

Expand Down
3 changes: 2 additions & 1 deletion ir/pass_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ limitations under the License.

#include "ir/pass_utils.h"

#include <absl/strings/str_cat.h>

#include <initializer_list>
#include <tuple>

#include "absl/strings/str_cat.h"
#include "lib/log.h"
#include "pass_utils.h"

Expand Down
3 changes: 2 additions & 1 deletion ir/visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ limitations under the License.
#include <stdlib.h>
#include <time.h>

#include "absl/container/flat_hash_map.h"
#include <absl/container/flat_hash_map.h>

#include "ir/ir-generated.h"
#include "lib/hash.h"

Expand Down
3 changes: 2 additions & 1 deletion lib/bitrange.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ limitations under the License.
#ifndef LIB_BITRANGE_H_
#define LIB_BITRANGE_H_

#include <absl/numeric/bits.h>

#include <algorithm>
#include <iosfwd>
#include <limits>
#include <optional>
#include <utility>

#include "absl/numeric/bits.h"
#include "bitvec.h"
#include "exceptions.h"
#include "hash.h"
Expand Down
2 changes: 1 addition & 1 deletion test/gtest/complex_bitwise.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <absl/strings/substitute.h>
#include <gtest/gtest.h>

#include <optional>

#include "absl/strings/substitute.h"
#include "frontends/common/parseInput.h"
#include "frontends/common/resolveReferences/referenceMap.h"
#include "frontends/p4/toP4/toP4.h"
Expand Down
2 changes: 1 addition & 1 deletion test/gtest/diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <absl/strings/substitute.h>
#include <gtest/gtest.h>

#include <optional>

#include "absl/strings/substitute.h"
#include "frontends/common/applyOptionsPragmas.h"
#include "test/gtest/helpers.h"

Expand Down
2 changes: 1 addition & 1 deletion test/gtest/p4runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <absl/strings/substitute.h>
#include <google/protobuf/util/message_differencer.h>
#include <gtest/gtest.h>

Expand All @@ -24,7 +25,6 @@ limitations under the License.
#include <string>
#include <vector>

#include "absl/strings/substitute.h"
#include "control-plane/p4/config/v1/p4types.pb.h"
#include "control-plane/p4/v1/p4runtime.pb.h"
#include "p4/config/v1/p4info.pb.h"
Expand Down

0 comments on commit bb95bee

Please sign in to comment.