This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada, treelang needs to be converted to --enable-mapped-location


    To summarize:  you can create the Source_Ptr -> source_location
    mapping in two basic ways:  interleaved with lexing, or as a
    mapping when the Source_Buffer is read in.  Whichever you prefer.

I guess the question is what does "read" mean in the context of a 
compiler that doesn't call the lexer library.

It's tricky to make calls from the Ada part of the code since, as Geert
pointed out, that code is also used wiht non-GCC back-ends.

Moreover, it's quite common for the Ada front-end to read a file and
no item in the file is in the produced tree.

So I'd interpret "read" as meaning "being asked to convert the first
GNAT tree node using this file into a GCC node".  Is there a way to find
out if a filename has been seen already or do we need a separate hash table
just for that purpose?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]