// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_CHECK_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_CHECK_H_ #include <iosfwd> #include "partition_alloc/buildflags.h" #include "partition_alloc/partition_alloc_base/compiler_specific.h" #include "partition_alloc/partition_alloc_base/component_export.h" #include "partition_alloc/partition_alloc_base/immediate_crash.h" #include "partition_alloc/partition_alloc_base/log_message.h" #include "partition_alloc/partition_alloc_base/strings/cstring_builder.h" #define PA_STRINGIFY_IMPL(s) … #define PA_STRINGIFY(s) … // This header defines the CHECK, DCHECK, and DPCHECK macros. // // CHECK dies with a fatal error if its condition is not true. It is not // controlled by NDEBUG, so the check will be executed regardless of compilation // mode. // // DCHECK, the "debug mode" check, is enabled depending on NDEBUG and // DCHECK_ALWAYS_ON, and its severity depends on DCHECK_IS_CONFIGURABLE. // // (D)PCHECK is like (D)CHECK, but includes the system error code (c.f. // perror(3)). // // Additional information can be streamed to these macros and will be included // in the log output if the condition doesn't hold (you may need to include // <ostream>): // // CHECK(condition) << "Additional info."; // // The condition is evaluated exactly once. Even in build modes where e.g. // DCHECK is disabled, the condition and any stream arguments are still // referenced to avoid warnings about unused variables and functions. // // For the (D)CHECK_EQ, etc. macros, see base/check_op.h. However, that header // is *significantly* larger than check.h, so try to avoid including it in // header files. namespace partition_alloc::internallogging // namespace partition_alloc::internal::logging #endif // PARTITION_ALLOC_PARTITION_ALLOC_BASE_CHECK_H_