diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-02-25 01:36:03 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-02-25 01:36:03 +0000 |
commit | 574a0ef53cf95e08a80f8e58711e90adfc3834f3 (patch) | |
tree | 2fe743cce5c60c9804689fb64441246f66c1a9d2 /gcc/cp/optimize.c | |
parent | 68723fae698fb8b031395612a75b0bcb905d240b (diff) | |
download | gcc-574a0ef53cf95e08a80f8e58711e90adfc3834f3.zip gcc-574a0ef53cf95e08a80f8e58711e90adfc3834f3.tar.gz gcc-574a0ef53cf95e08a80f8e58711e90adfc3834f3.tar.bz2 |
lex.c (check_newline): Use push_srcloc and pop_srcloc, rather than duplicating functionality here.
* lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
than duplicating functionality here.
* optimize.c: Include input.h.
(expand_call_inline): Use push_srcloc and pop_srcloc.
* parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
* parse.c: Regenerated.
* Makefile.in (lex.o): Depend on input.h.
(optimize.o): Likewise.
From-SVN: r32142
Diffstat (limited to 'gcc/cp/optimize.c')
-rw-r--r-- | gcc/cp/optimize.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index f668ec4..e18f956 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -25,6 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "cp-tree.h" #include "rtl.h" #include "insn-config.h" +#include "input.h" #include "integrate.h" #include "varray.h" @@ -569,6 +570,13 @@ expand_call_inline (tp, walk_subtrees, data) if (!inlinable_function_p (fn, id)) return NULL_TREE; + /* Set the current filename and line number to the function we are + inlining so that when we create new _STMT nodes here they get + line numbers corresponding to the function we are calling. We + wrap the whole inlined body in an EXPR_WITH_FILE_AND_LINE as well + because individual statements don't record the filename. */ + push_srcloc (fn->decl.filename, fn->decl.linenum); + /* Build a statement-expression containing code to initialize the arguments, the actual inline expansion of the body, and a label for the return statements within the function to jump to. The @@ -660,6 +668,7 @@ expand_call_inline (tp, walk_subtrees, data) /*col=*/0); EXPR_WFL_EMIT_LINE_NOTE (*tp) = 1; TREE_CHAIN (*tp) = chain; + pop_srcloc (); /* If the value of the new expression is ignored, that's OK. We don't warn about this for CALL_EXPRs, so we shouldn't warn about |