Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/share/utilities/numberSeq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
*/

#include "memory/allocation.inline.hpp"
#include "memory/allocation.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My rule is if there is a .inline.hpp file, always include it instead of the .hpp file in the .cpp to be sure to catch everything (the inline.hpp always includes the .hpp); and the allocation.hpp must already be included in numberSeq.hpp.

This just gives headaches imo when more code is moved to the .inline.hpp file. It works this time because nothing from CHeapObj is in the inline.hpp file, so technically the removal of this include entirely works (as mentioned in the other comment, numberSeq.hpp needs to include allocation.hpp).

#include "utilities/debug.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/numberSeq.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/utilities/numberSeq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef SHARE_UTILITIES_NUMBERSEQ_HPP
#define SHARE_UTILITIES_NUMBERSEQ_HPP

#include "memory/allocation.hpp"
#include "utilities/ostream.hpp"
Copy link
Contributor

@tschatzl tschatzl Sep 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHeapObj is from allocation.hpp. So the original include is correct.

Instead of including the other header just for outputStream, better forward-declare it in the .hpp file here and include it in the cpp file.


/**
** This file contains a few classes that represent number sequence,
Expand Down