Commit 75790c98 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[iwyu] Add missing includes of <memory> for std::unique_ptr

After https://crrev.com/c/1800575 and https://crrev.com/c/1803343,
which tried to fix this on occuring compile errors, this CL
systematically adds the <memory> include to each header that uses
{std::unique_ptr}.

R=sigurds@chromium.org
TBR=mlippautz@chromium.org,alph@chromium.org,rmcilroy@chromium.org,verwaest@chromium.org

Bug: v8:9396
Change-Id: If7f9c3140842f9543135dddd7344c0f357999da0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803349Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63767}
parent 0e570c1a
......@@ -5,6 +5,8 @@
#ifndef V8_LIBPLATFORM_LIBPLATFORM_H_
#define V8_LIBPLATFORM_LIBPLATFORM_H_
#include <memory>
#include "libplatform/libplatform-export.h"
#include "libplatform/v8-tracing.h"
#include "v8-platform.h" // NOLINT(build/include)
......
......@@ -6,8 +6,10 @@
#define V8_V8_PROFILER_H_
#include <limits.h>
#include <memory>
#include <unordered_set>
#include <vector>
#include "v8.h" // NOLINT(build/include)
/**
......
......@@ -5,6 +5,8 @@
#ifndef V8_API_API_H_
#define V8_API_API_H_
#include <memory>
#include "include/v8-testing.h"
#include "src/execution/isolate.h"
#include "src/heap/factory.h"
......
......@@ -5,10 +5,12 @@
#ifndef V8_AST_PRETTYPRINTER_H_
#define V8_AST_PRETTYPRINTER_H_
#include <memory>
#include "src/ast/ast.h"
#include "src/base/compiler-specific.h"
#include "src/utils/allocation.h"
#include "src/objects/function-kind.h"
#include "src/utils/allocation.h"
namespace v8 {
namespace internal {
......
......@@ -9,6 +9,7 @@
#define V8_BASE_FREE_DELETER_H_
#include <stdlib.h>
#include <memory>
namespace v8 {
namespace base {
......
......@@ -41,6 +41,7 @@
#define V8_CODEGEN_ARM_ASSEMBLER_ARM_H_
#include <stdio.h>
#include <memory>
#include <vector>
#include "src/codegen/arm/constants-arm.h"
......
......@@ -8,6 +8,7 @@
#include <deque>
#include <list>
#include <map>
#include <memory>
#include <vector>
#include "src/base/optional.h"
......
......@@ -36,6 +36,7 @@
#define V8_CODEGEN_ASSEMBLER_H_
#include <forward_list>
#include <memory>
#include <unordered_map>
#include "src/base/memory.h"
......
......@@ -38,6 +38,7 @@
#define V8_CODEGEN_IA32_ASSEMBLER_IA32_H_
#include <deque>
#include <memory>
#include "src/codegen/assembler.h"
#include "src/codegen/ia32/constants-ia32.h"
......
......@@ -36,6 +36,7 @@
#define V8_CODEGEN_MIPS_ASSEMBLER_MIPS_H_
#include <stdio.h>
#include <memory>
#include <set>
......
......@@ -36,7 +36,7 @@
#define V8_CODEGEN_MIPS64_ASSEMBLER_MIPS64_H_
#include <stdio.h>
#include <memory>
#include <set>
#include "src/codegen/assembler.h"
......
......@@ -41,6 +41,7 @@
#define V8_CODEGEN_PPC_ASSEMBLER_PPC_H_
#include <stdio.h>
#include <memory>
#include <vector>
#include "src/codegen/assembler.h"
......
......@@ -40,6 +40,7 @@
#ifndef V8_CODEGEN_S390_ASSEMBLER_S390_H_
#define V8_CODEGEN_S390_ASSEMBLER_S390_H_
#include <stdio.h>
#include <memory>
#if V8_HOST_ARCH_S390
// elf.h include is required for auxv check for STFLE facility used
// for hardware detection, which is sensible only on s390 hosts.
......
......@@ -5,6 +5,8 @@
#ifndef V8_CODEGEN_TURBO_ASSEMBLER_H_
#define V8_CODEGEN_TURBO_ASSEMBLER_H_
#include <memory>
#include "src/base/template-utils.h"
#include "src/builtins/builtins.h"
#include "src/codegen/assembler-arch.h"
......
......@@ -39,6 +39,7 @@
#include <deque>
#include <map>
#include <memory>
#include <vector>
#include "src/codegen/assembler.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_COMPILER_BACKEND_CODE_GENERATOR_H_
#define V8_COMPILER_BACKEND_CODE_GENERATOR_H_
#include <memory>
#include "src/base/optional.h"
#include "src/codegen/macro-assembler.h"
#include "src/codegen/safepoint-table.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_COMPILER_INT64_LOWERING_H_
#define V8_COMPILER_INT64_LOWERING_H_
#include <memory>
#include "src/common/globals.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_COMPILER_PIPELINE_H_
#define V8_COMPILER_PIPELINE_H_
#include <memory>
// Clients of this interface shouldn't depend on lots of compiler internals.
// Do not include anything from src/compiler here!
#include "src/common/globals.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_DEBUG_DEBUG_COVERAGE_H_
#define V8_DEBUG_DEBUG_COVERAGE_H_
#include <memory>
#include <vector>
#include "src/debug/debug-interface.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_DEBUG_DEBUG_FRAMES_H_
#define V8_DEBUG_DEBUG_FRAMES_H_
#include <memory>
#include "src/deoptimizer/deoptimizer.h"
#include "src/execution/isolate.h"
#include "src/execution/v8threads.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_DEBUG_DEBUG_INTERFACE_H_
#define V8_DEBUG_DEBUG_INTERFACE_H_
#include <memory>
#include "include/v8-inspector.h"
#include "include/v8-util.h"
#include "include/v8.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_DEBUG_DEBUG_STACK_TRACE_ITERATOR_H_
#define V8_DEBUG_DEBUG_STACK_TRACE_ITERATOR_H_
#include <memory>
#include "src/debug/debug-frames.h"
#include "src/debug/debug-interface.h"
#include "src/execution/frames.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_DEBUG_DEBUG_TYPE_PROFILE_H_
#define V8_DEBUG_DEBUG_TYPE_PROFILE_H_
#include <memory>
#include <vector>
#include "src/debug/debug-interface.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_DEBUG_DEBUG_H_
#define V8_DEBUG_DEBUG_H_
#include <memory>
#include <vector>
#include "src/codegen/source-position-table.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_HANDLES_GLOBAL_HANDLES_H_
#define V8_HANDLES_GLOBAL_HANDLES_H_
#include <memory>
#include <type_traits>
#include <utility>
#include <vector>
......
......@@ -5,6 +5,8 @@
#ifndef V8_HEAP_CONCURRENT_MARKING_H_
#define V8_HEAP_CONCURRENT_MARKING_H_
#include <memory>
#include "include/v8-platform.h"
#include "src/base/atomic-utils.h"
#include "src/base/platform/condition-variable.h"
......
......@@ -7,6 +7,7 @@
#include <cmath>
#include <map>
#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <vector>
......
......@@ -5,6 +5,8 @@
#ifndef V8_HEAP_REMEMBERED_SET_H_
#define V8_HEAP_REMEMBERED_SET_H_
#include <memory>
#include "src/base/memory.h"
#include "src/codegen/reloc-info.h"
#include "src/heap/heap.h"
......
......@@ -6,6 +6,7 @@
#define V8_HEAP_SLOT_SET_H_
#include <map>
#include <memory>
#include <stack>
#include "src/base/atomic-utils.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_INIT_ISOLATE_ALLOCATOR_H_
#define V8_INIT_ISOLATE_ALLOCATOR_H_
#include <memory>
#include "src/base/bounded-page-allocator.h"
#include "src/base/page-allocator.h"
#include "src/common/globals.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_INSPECTOR_CUSTOM_PREVIEW_H_
#define V8_INSPECTOR_CUSTOM_PREVIEW_H_
#include <memory>
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/protocol/Runtime.h"
......
......@@ -31,6 +31,7 @@
#ifndef V8_INSPECTOR_INJECTED_SCRIPT_H_
#define V8_INSPECTOR_INJECTED_SCRIPT_H_
#include <memory>
#include <unordered_map>
#include <unordered_set>
......
......@@ -5,6 +5,7 @@
#ifndef V8_INSPECTOR_INSPECTED_CONTEXT_H_
#define V8_INSPECTOR_INSPECTED_CONTEXT_H_
#include <memory>
#include <unordered_map>
#include <unordered_set>
......
......@@ -5,6 +5,8 @@
#ifndef V8_INSPECTOR_REMOTE_OBJECT_ID_H_
#define V8_INSPECTOR_REMOTE_OBJECT_ID_H_
#include <memory>
#include "src/inspector/protocol/Forward.h"
namespace v8_inspector {
......
......@@ -5,6 +5,8 @@
#ifndef V8_INSPECTOR_SEARCH_UTIL_H_
#define V8_INSPECTOR_SEARCH_UTIL_H_
#include <memory>
#include "src/inspector/protocol/Debugger.h"
#include "src/inspector/string-util.h"
......
......@@ -7,7 +7,9 @@
#include <deque>
#include <map>
#include <memory>
#include <set>
#include "include/v8.h"
#include "src/inspector/protocol/Console.h"
#include "src/inspector/protocol/Forward.h"
......
......@@ -6,6 +6,7 @@
#define V8_INSPECTOR_V8_DEBUGGER_AGENT_IMPL_H_
#include <deque>
#include <memory>
#include <unordered_map>
#include <vector>
......
......@@ -30,6 +30,8 @@
#ifndef V8_INSPECTOR_V8_DEBUGGER_SCRIPT_H_
#define V8_INSPECTOR_V8_DEBUGGER_SCRIPT_H_
#include <memory>
#include "src/base/macros.h"
#include "src/inspector/string-16.h"
#include "src/inspector/string-util.h"
......
......@@ -6,6 +6,7 @@
#define V8_INSPECTOR_V8_DEBUGGER_H_
#include <list>
#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <vector>
......
......@@ -5,6 +5,8 @@
#ifndef V8_INSPECTOR_V8_HEAP_PROFILER_AGENT_IMPL_H_
#define V8_INSPECTOR_V8_HEAP_PROFILER_AGENT_IMPL_H_
#include <memory>
#include "src/base/macros.h"
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/HeapProfiler.h"
......
......@@ -33,6 +33,7 @@
#include <functional>
#include <map>
#include <memory>
#include <unordered_map>
#include "src/base/macros.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_INSPECTOR_V8_INSPECTOR_SESSION_IMPL_H_
#define V8_INSPECTOR_V8_INSPECTOR_SESSION_IMPL_H_
#include <memory>
#include <vector>
#include "src/base/macros.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_INSPECTOR_V8_PROFILER_AGENT_IMPL_H_
#define V8_INSPECTOR_V8_PROFILER_AGENT_IMPL_H_
#include <memory>
#include <vector>
#include "src/base/macros.h"
......
......@@ -31,6 +31,7 @@
#ifndef V8_INSPECTOR_V8_RUNTIME_AGENT_IMPL_H_
#define V8_INSPECTOR_V8_RUNTIME_AGENT_IMPL_H_
#include <memory>
#include <unordered_map>
#include "src/base/macros.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_INSPECTOR_V8_SCHEMA_AGENT_IMPL_H_
#define V8_INSPECTOR_V8_SCHEMA_AGENT_IMPL_H_
#include <memory>
#include "src/base/macros.h"
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Schema.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_INSPECTOR_WASM_TRANSLATION_H_
#define V8_INSPECTOR_WASM_TRANSLATION_H_
#include <memory>
#include <unordered_map>
#include "include/v8.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_INTERPRETER_BYTECODE_ARRAY_ACCESSOR_H_
#define V8_INTERPRETER_BYTECODE_ARRAY_ACCESSOR_H_
#include <memory>
#include "src/base/optional.h"
#include "src/common/globals.h"
#include "src/handles/handles.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_
#define V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_
#include <memory>
#include "src/interpreter/bytecode-array-accessor.h"
namespace v8 {
......
......@@ -5,6 +5,8 @@
#ifndef V8_INTERPRETER_BYTECODE_ARRAY_RANDOM_ITERATOR_H_
#define V8_INTERPRETER_BYTECODE_ARRAY_RANDOM_ITERATOR_H_
#include <memory>
#include "src/interpreter/bytecode-array-accessor.h"
#include "src/zone/zone-containers.h"
#include "src/zone/zone.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_LIBPLATFORM_DEFAULT_FOREGROUND_TASK_RUNNER_H_
#define V8_LIBPLATFORM_DEFAULT_FOREGROUND_TASK_RUNNER_H_
#include <memory>
#include <queue>
#include "include/libplatform/libplatform.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_LIBPLATFORM_DEFAULT_WORKER_THREADS_TASK_RUNNER_H_
#define V8_LIBPLATFORM_DEFAULT_WORKER_THREADS_TASK_RUNNER_H_
#include <memory>
#include <vector>
#include "include/libplatform/libplatform-export.h"
......
......@@ -6,6 +6,7 @@
#define V8_LIBSAMPLER_SAMPLER_H_
#include <atomic>
#include <memory>
#include <unordered_map>
#include "include/v8.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_LOGGING_COUNTERS_H_
#define V8_LOGGING_COUNTERS_H_
#include <memory>
#include "include/v8.h"
#include "src/base/atomic-utils.h"
#include "src/base/optional.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_LOGGING_LOG_H_
#define V8_LOGGING_LOG_H_
#include <memory>
#include <set>
#include <string>
......
......@@ -5,6 +5,8 @@
#ifndef V8_OBJECTS_BACKING_STORE_H_
#define V8_OBJECTS_BACKING_STORE_H_
#include <memory>
#include "src/handles/handles.h"
namespace v8 {
......
......@@ -5,6 +5,8 @@
#ifndef V8_OBJECTS_DEBUG_OBJECTS_H_
#define V8_OBJECTS_DEBUG_OBJECTS_H_
#include <memory>
#include "src/objects/fixed-array.h"
#include "src/objects/objects.h"
#include "src/objects/struct.h"
......
......@@ -10,6 +10,7 @@
#define V8_OBJECTS_INTL_OBJECTS_H_
#include <map>
#include <memory>
#include <set>
#include <string>
......
......@@ -5,6 +5,8 @@
#ifndef V8_OBJECTS_SCRIPT_H_
#define V8_OBJECTS_SCRIPT_H_
#include <memory>
#include "src/objects/fixed-array.h"
#include "src/objects/objects.h"
#include "src/objects/struct.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_OBJECTS_SHARED_FUNCTION_INFO_H_
#define V8_OBJECTS_SHARED_FUNCTION_INFO_H_
#include <memory>
#include "src/codegen/bailout-reason.h"
#include "src/objects/compressed-slots.h"
#include "src/objects/function-kind.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_OBJECTS_STRING_H_
#define V8_OBJECTS_STRING_H_
#include <memory>
#include "src/base/bits.h"
#include "src/base/export-template.h"
#include "src/objects/instance-type.h"
......
......@@ -7,6 +7,8 @@
#include "src/parsing/preparse-data.h"
#include <memory>
#include "src/common/assert-scope.h"
namespace v8 {
......
......@@ -5,6 +5,8 @@
#ifndef V8_PARSING_PREPARSE_DATA_H_
#define V8_PARSING_PREPARSE_DATA_H_
#include <memory>
#include "src/common/globals.h"
#include "src/handles/handles.h"
#include "src/handles/maybe-handles.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_PARSING_SCANNER_CHARACTER_STREAMS_H_
#define V8_PARSING_SCANNER_CHARACTER_STREAMS_H_
#include <memory>
#include "include/v8.h" // for v8::ScriptCompiler
#include "src/common/globals.h"
......
......@@ -8,6 +8,7 @@
#define V8_PARSING_SCANNER_H_
#include <algorithm>
#include <memory>
#include "src/base/logging.h"
#include "src/common/globals.h"
......
......@@ -6,6 +6,7 @@
#define V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_
#include <deque>
#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <vector>
......
......@@ -7,6 +7,8 @@
#include "src/profiler/profile-generator.h"
#include <memory>
namespace v8 {
namespace internal {
......
......@@ -5,6 +5,8 @@
#ifndef V8_PROFILER_TRACING_CPU_PROFILER_H_
#define V8_PROFILER_TRACING_CPU_PROFILER_H_
#include <memory>
#include "include/v8-platform.h"
#include "src/base/atomic-utils.h"
#include "src/base/macros.h"
......
......@@ -8,6 +8,7 @@
#include <cinttypes>
#include <cstdio>
#include <cstring>
#include <memory>
#include "src/common/globals.h"
#include "src/snapshot/embedded/embedded-data.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_STRINGS_STRING_STREAM_H_
#define V8_STRINGS_STRING_STREAM_H_
#include <memory>
#include "src/base/small-vector.h"
#include "src/handles/handles.h"
#include "src/objects/heap-object.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_TORQUE_DECLARATIONS_H_
#define V8_TORQUE_DECLARATIONS_H_
#include <memory>
#include <string>
#include "src/torque/declarable.h"
......
......@@ -6,6 +6,7 @@
#define V8_TORQUE_EARLEY_PARSER_H_
#include <map>
#include <memory>
#include <vector>
#include "src/base/optional.h"
......
......@@ -6,6 +6,7 @@
#define V8_TORQUE_GLOBAL_CONTEXT_H_
#include <map>
#include <memory>
#include "src/common/globals.h"
#include "src/torque/ast.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_TORQUE_IMPLEMENTATION_VISITOR_H_
#define V8_TORQUE_IMPLEMENTATION_VISITOR_H_
#include <memory>
#include <string>
#include "src/base/macros.h"
......
......@@ -6,6 +6,7 @@
#define V8_TORQUE_SERVER_DATA_H_
#include <map>
#include <memory>
#include <vector>
#include "src/base/macros.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_TORQUE_TYPE_ORACLE_H_
#define V8_TORQUE_TYPE_ORACLE_H_
#include <memory>
#include "src/torque/contextual.h"
#include "src/torque/declarable.h"
#include "src/torque/declarations.h"
......
......@@ -8,6 +8,7 @@
#include <algorithm>
#include <cstring>
#include <iterator>
#include <memory>
#include "src/common/checks.h"
#include "src/common/globals.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_WASM_FUNCTION_COMPILER_H_
#define V8_WASM_FUNCTION_COMPILER_H_
#include <memory>
#include "src/codegen/code-desc.h"
#include "src/trap-handler/trap-handler.h"
#include "src/wasm/compilation-environment.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_WASM_MODULE_DECODER_H_
#define V8_WASM_MODULE_DECODER_H_
#include <memory>
#include "src/common/globals.h"
#include "src/wasm/function-body-decoder.h"
#include "src/wasm/wasm-constants.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_WASM_WASM_INTERPRETER_H_
#define V8_WASM_WASM_INTERPRETER_H_
#include <memory>
#include "src/wasm/wasm-opcodes.h"
#include "src/wasm/wasm-value.h"
#include "src/zone/zone-containers.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_WASM_WASM_OBJECTS_H_
#define V8_WASM_WASM_OBJECTS_H_
#include <memory>
#include "src/base/bits.h"
#include "src/codegen/signature.h"
#include "src/debug/debug.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_CCTEST_COMPILER_SERIALIZER_TESTER_H_
#define V8_CCTEST_COMPILER_SERIALIZER_TESTER_H_
#include <memory>
#include "src/compiler/js-heap-broker.h"
#include "test/cctest/cctest.h"
......
......@@ -5,6 +5,8 @@
#ifndef V8_TEST_COMMON_ASSEMBLER_TESTER_H_
#define V8_TEST_COMMON_ASSEMBLER_TESTER_H_
#include <memory>
#include "src/codegen/assembler.h"
#include "src/codegen/code-desc.h"
......
......@@ -5,6 +5,8 @@
#ifndef TEST_FUZZER_FUZZER_SUPPORT_H_
#define TEST_FUZZER_FUZZER_SUPPORT_H_
#include <memory>
#include "include/libplatform/libplatform.h"
#include "include/v8.h"
......
......@@ -7,6 +7,7 @@
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include "src/wasm/module-decoder.h"
#include "src/wasm/wasm-interpreter.h"
......
......@@ -6,6 +6,7 @@
#define V8_TEST_INSPECTOR_PROTOCOL_ISOLATE_DATA_H_
#include <map>
#include <memory>
#include "include/v8-inspector.h"
#include "include/v8-platform.h"
......
......@@ -6,6 +6,7 @@
#define V8_TEST_INSPECTOR_PROTOCOL_TASK_RUNNER_H_
#include <map>
#include <memory>
#include "include/v8-inspector.h"
#include "include/v8-platform.h"
......
......@@ -10,6 +10,7 @@
#ifndef V8_TOOLS_DEBUG_HELPER_DEBUG_HELPER_INTERNAL_H_
#define V8_TOOLS_DEBUG_HELPER_DEBUG_HELPER_INTERNAL_H_
#include <memory>
#include <string>
#include <vector>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment