From aa26cede635011f5cc075cd528934ce8d8e8eef9 Mon Sep 17 00:00:00 2001 From: Qizheng Xing Date: Fri, 27 Jun 2025 08:17:13 +0000 Subject: [PATCH] 8360474: Add missing include guards for some HotSpot headers Reviewed-by: mhaessig, stefank, dholmes --- src/hotspot/os/aix/decoder_aix.hpp | 6 +++++- src/hotspot/share/gc/g1/g1SharedClosures.hpp | 7 ++++++- src/hotspot/share/opto/library_call.hpp | 4 ++++ src/hotspot/share/utilities/packedTable.hpp | 5 +++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/hotspot/os/aix/decoder_aix.hpp b/src/hotspot/os/aix/decoder_aix.hpp index 0d87ba87b94..2ba3e1c5a3a 100644 --- a/src/hotspot/os/aix/decoder_aix.hpp +++ b/src/hotspot/os/aix/decoder_aix.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -23,6 +23,9 @@ * */ +#ifndef OS_AIX_DECODER_AIX_HPP +#define OS_AIX_DECODER_AIX_HPP + #include "utilities/decoder.hpp" #include "porting_aix.hpp" @@ -44,3 +47,4 @@ class AIXDecoder: public AbstractDecoder { }; +#endif // OS_AIX_DECODER_AIX_HPP diff --git a/src/hotspot/share/gc/g1/g1SharedClosures.hpp b/src/hotspot/share/gc/g1/g1SharedClosures.hpp index 5541d6274a3..a81f62ff308 100644 --- a/src/hotspot/share/gc/g1/g1SharedClosures.hpp +++ b/src/hotspot/share/gc/g1/g1SharedClosures.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,6 +22,9 @@ * */ +#ifndef SHARE_GC_G1_G1SHAREDCLOSURES_HPP +#define SHARE_GC_G1_G1SHAREDCLOSURES_HPP + #include "gc/g1/g1NMethodClosure.hpp" #include "gc/g1/g1OopClosures.hpp" #include "memory/iterator.hpp" @@ -54,3 +57,5 @@ public: _clds(&_oops_in_cld, process_only_dirty), _nmethods(pss->worker_id(), &_oops_in_nmethod, should_mark) {} }; + +#endif // SHARE_GC_G1_G1SHAREDCLOSURES_HPP diff --git a/src/hotspot/share/opto/library_call.hpp b/src/hotspot/share/opto/library_call.hpp index a622eefa248..94b02290ccd 100644 --- a/src/hotspot/share/opto/library_call.hpp +++ b/src/hotspot/share/opto/library_call.hpp @@ -22,6 +22,9 @@ * */ +#ifndef SHARE_OPTO_LIBRARY_CALL_HPP +#define SHARE_OPTO_LIBRARY_CALL_HPP + #include "ci/ciMethod.hpp" #include "classfile/javaClasses.hpp" #include "opto/callGenerator.hpp" @@ -416,3 +419,4 @@ class LibraryCallKit : public GraphKit { bool inline_blackhole(); }; +#endif // SHARE_OPTO_LIBRARY_CALL_HPP diff --git a/src/hotspot/share/utilities/packedTable.hpp b/src/hotspot/share/utilities/packedTable.hpp index ed08a2b4c21..1266c65cbf1 100644 --- a/src/hotspot/share/utilities/packedTable.hpp +++ b/src/hotspot/share/utilities/packedTable.hpp @@ -22,6 +22,9 @@ * */ +#ifndef SHARE_UTILITIES_PACKEDTABLE_HPP +#define SHARE_UTILITIES_PACKEDTABLE_HPP + #include "oops/array.hpp" #include "utilities/globalDefinitions.hpp" @@ -121,3 +124,5 @@ public: } } }; + +#endif // SHARE_UTILITIES_PACKEDTABLE_HPP