RFR: 8365829: Multiple definitions of static 'phase_names' [v2]

Francesco Andreuzzi duke at openjdk.org
Thu Aug 21 08:16:30 UTC 2025


On Wed, 20 Aug 2025 19:35:42 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Underscore: 90e9c537709ad4c384f7efd2ed18c63a4c21b51b
>
> Don't make it a friend, make it a static member function, and fix the one
> caller (later in this file). (The definition of find_phase could be moved to
> the new .cpp file.) I think the caller also has an ODR problem, with calls
> from different including TUs getting a different file-scoped find_phase.
> 
> It looks like there might be a lot of file-scoped static declarations from
> header files in our code. I've made a note to look into this.

Sure: cc7da3adeea447ee8c108f0179943de785a6e239

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26851#discussion_r2290268909


More information about the hotspot-compiler-dev mailing list