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] | |
* Note that we compile the gch file as it were the main file - i.e. it has the MAIN_FILE_P property, and it is not included from any file. This means the restored line_table is slightly anomalous. One solution to this is when we generate the gch file, we pretend the .h file is included in a dummy file, which we may call <main>. This adds two line_map entries: one for <main> before the LC_ENTER of the .h file, and one at the end to LC_LEAVE the .h file. Then when we restore, we patch both of these to replace "<main>" by the real main file name.
* Any source_location values handed out before the #include that restores the gch will become invalid. They will be re-mapped to that in the pre-compiled header. Presumably that's ok - there's no declartions or expressions in the main file at that point, or the restore would have failed. Any declarations that are <builtin> or in the <command line> will presumably be the same either way.
* Presumably we need custom code to save and restore the line-map. Zack experimented with having the entire line_table we gc-allocated, and thus making using of the GTY machinery. This addes an extra indirection for each access to the line_table (probably not a big deal - cpplib accesses are via the cpp_reader and thus unchanged). But note we still need custom restore code.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |