public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* How to get the global namespace (DECL_CONTEXT) at LTO during LGEN?
@ 2021-06-30  8:22 Erick Ochoa
  2021-06-30  9:18 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Erick Ochoa @ 2021-06-30  8:22 UTC (permalink / raw)
  To: gcc

Hello,

I am wondering if there's a way to get the global namespace at LTO
during LGEN in each of the partitions being processed. I believe that
during parse time for c/c++ there is a global_namespace macro or
variable that can be used, but I don't think that it is possible to
use at link time.

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to get the global namespace (DECL_CONTEXT) at LTO during LGEN?
  2021-06-30  8:22 How to get the global namespace (DECL_CONTEXT) at LTO during LGEN? Erick Ochoa
@ 2021-06-30  9:18 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2021-06-30  9:18 UTC (permalink / raw)
  To: Erick Ochoa; +Cc: GCC Development

On Wed, Jun 30, 2021 at 10:23 AM Erick Ochoa via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hello,
>
> I am wondering if there's a way to get the global namespace at LTO
> during LGEN in each of the partitions being processed. I believe that
> during parse time for c/c++ there is a global_namespace macro or
> variable that can be used, but I don't think that it is possible to
> use at link time.

There can be many - walking DECL_CONTEXT will eventually
lead to a TRANSLATION_UNIT_DECL (but there can be some
with NULL, I don't remember if we force-associate ones not
associated with a TU by the frontends)

Richard.

> Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-30  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30  8:22 How to get the global namespace (DECL_CONTEXT) at LTO during LGEN? Erick Ochoa
2021-06-30  9:18 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).