diff options
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index c5b14460b94..00adb7239c5 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -361,6 +361,17 @@ cxx_init (void) interface_unknown = 1; + /* The fact that G++ uses COMDAT for many entities (inline + functions, template instantiations, virtual tables, etc.) mean + that it is fundamentally unreliable to try to make decisions + about whether or not to output a particular entity until the end + of the compilation. However, the inliner requires that functions + be provided to the back end if they are to be inlined. + Therefore, we always use unit-at-a-time mode; in that mode, we + can provide entities to the back end and it will decide what to + emit based on what is actually needed. */ + flag_unit_at_a_time = 1; + if (c_common_init () == false) { pop_srcloc(); @@ -369,7 +380,7 @@ cxx_init (void) init_cp_pragma (); - init_repo (main_input_filename); + init_repo (); pop_srcloc(); return true; |