On Tue, 5 Jan 2021 00:12:58 GMT, Ioi Lam <ik...@openjdk.org> wrote: >>> `#include "runtime/globals_shared.hpp"` should not be removed. >>> compiler_globals.hpp uses the `DECLARE_FLAGS` macro, which is defined by >>> globals_shared.hpp. >> >> Since globals_shared.hpp is included in compiler_globals_pd.hpp, I think >> it's fine to remove it. > > We should not rely on indirect inclusion. Otherwise, compiler_globals.hpp > will break if compiler_globals_pd.hpp is changed to not include > globals_shared.hpp. > > In fact, I have been fixing a lot of such problems when restructuring the > header files. See https://github.com/openjdk/jdk/pull/1610 -- the vast > majority of the 59 files changed in that PR were caused by relying on > indirect inclusion of stubRoutines.hpp.
Yes, if something is using the definitions from the header, that header should be included directly. So, the patch is just adding the `#include "compiler/compiler_globals_pd.hpp"` then, right? ------------- PR: https://git.openjdk.java.net/jdk/pull/1894