On 11/22/24 3:09 PM, David Malcolm wrote:
On Fri, 2024-11-22 at 13:15 -0800, Andrew Pinski wrote:
Since diagnostic.h is included in over half of the sources, requiring
to `#define INCLUDE_MEMORY`
does not make sense. Instead lets unconditionally include memory in
system.h.
The majority of this patch is just removing `#define INCLUDE_MEMORY`
from the sources which currently
have it.
Sorry about the unpleasantness.
FWIW I did consider simply including <memory> unconditionally for r15-
4610 ("Use unique_ptr in more places in pretty_printer/diagnostics
[PR116613]")
https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665443.html
but the verbose approach seemed to me like something I could self-
approve; the simple approach didn't.
As I said there, I'd like to use std::unique_ptr in more places, such
as when creating passes, so I think the number of places we'd need
INCLUDE_MEMORY is likely to eventually be most of the TUs in the
compiler.
So I'm in favor of Andrew's patch, FWIW
Likewise. ACK'd for the trunk.
jeff