diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-30 18:11:14 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-30 18:11:14 +0000 |
commit | 2ed8b5d0fb02aeec25a8ff7cd1e48f2fafbf45f3 (patch) | |
tree | 01829581c8eb09eede00ea3a28703fb4b3440dc5 /gcc/gimplify.c | |
parent | 9a6486a6df3ead668aa9b95d72491fba067e7c03 (diff) | |
download | gcc-2ed8b5d0fb02aeec25a8ff7cd1e48f2fafbf45f3.tar.gz |
Conditionally compile support for --enable-mapped_location.
* tree-mudflap.c (mf_file_function_line_tree): Take a location_t
rather than a pointer to one. Use expand_location.
(mf_varname_tree): Use expand_location.
* tree-dump.c: Use expand_location on DECL_SOURCE_LOCATION.
* coverage.c: Likewise.
* print-tree.c: Likewise.
* c-aux-info.c (gen_aux_info_record): Likewise.
* c-parse.in: Use SET_EXPR_LOCATION macro.
* gimple-low.c: Likewise.
* tree-mudflap.c: Likewise.
* gimplify.c: Likewise. Also use EXPR_LOCATION and EXPR_HAS_LOCATION.
* c-ppoutput.c: Use new source_location typedef instead of fileline.
* c-semantics.c: Use new macros.
* c-typeck.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83920 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index c596ad90428..276c1990f14 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -453,10 +453,10 @@ internal_get_tmp_var (tree val, tree *pre_p, tree *post_p, bool is_formal) mod = build (MODIFY_EXPR, TREE_TYPE (t), t, val); class = TREE_CODE_CLASS (TREE_CODE (val)); - if (EXPR_LOCUS (val)) + if (EXPR_HAS_LOCATION (val)) SET_EXPR_LOCUS (mod, EXPR_LOCUS (val)); else - annotate_with_locus (mod, input_location); + SET_EXPR_LOCATION (mod, input_location); /* gimplify_modify_expr might want to reduce this further. */ gimplify_and_add (mod, pre_p); @@ -559,7 +559,7 @@ annotate_one_with_locus (tree t, location_t locus) if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (t))) && ! EXPR_HAS_LOCATION (t) && should_carry_locus_p (t)) - annotate_with_locus (t, locus); + SET_EXPR_LOCATION (t, locus); } void @@ -1832,8 +1832,8 @@ gimplify_call_expr (tree *expr_p, tree *pre_p, bool (*gimple_test_f) (tree)) /* For reliable diagnostics during inlining, it is necessary that every call_expr be annotated with file and line. */ - if (!EXPR_LOCUS (*expr_p)) - annotate_with_locus (*expr_p, input_location); + if (! EXPR_HAS_LOCATION (*expr_p)) + SET_EXPR_LOCATION (*expr_p, input_location); /* This may be a call to a builtin function. @@ -3435,7 +3435,6 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, tree internal_post = NULL_TREE; tree save_expr; int is_statement = (pre_p == NULL); - location_t *locus; location_t saved_location; enum gimplify_status ret; @@ -3455,12 +3454,9 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, post_p = &internal_post; saved_location = input_location; - if (save_expr == error_mark_node) - locus = NULL; - else - locus = EXPR_LOCUS (save_expr); - if (locus) - input_location = *locus; + if (save_expr != error_mark_node + && EXPR_HAS_LOCATION (*expr_p)) + input_location = EXPR_LOCATION (*expr_p); /* Loop over the specific gimplifiers until the toplevel node remains the same. */ |