aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-04-06 06:17:22 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-04-06 06:17:22 +0000
commit694dc0cad2f529e6e75cb4bdf09a64b9cd84de29 (patch)
tree134d9160405536ff36be7452764169f13a4466e5 /gcc
parent5c8e495222feb72e432b8e701961a6becf5f78b2 (diff)
downloadgcc-694dc0cad2f529e6e75cb4bdf09a64b9cd84de29.zip
gcc-694dc0cad2f529e6e75cb4bdf09a64b9cd84de29.tar.gz
gcc-694dc0cad2f529e6e75cb4bdf09a64b9cd84de29.tar.bz2
profile.c (branch_prob): Move declaration of local variable.
* profile.c (branch_prob): Move declaration of local variable. Remove obsolete ??? comment. Expand the location explicitly instead of using the LOCATION_FILE and LOCATION_LINE macros. From-SVN: r172019
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/profile.c16
2 files changed, 12 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 33a774c..b63116b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * profile.c (branch_prob): Move declaration of local variable. Remove
+ obsolete ??? comment. Expand the location explicitly instead of using
+ the LOCATION_FILE and LOCATION_LINE macros.
+
2011-04-06 Wei Guozhi <carrot@google.com>
PR target/47855
diff --git a/gcc/profile.c b/gcc/profile.c
index c5cada9..fd37748 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1123,16 +1123,13 @@ branch_prob (void)
/* Line numbers. */
if (coverage_begin_output ())
{
- gcov_position_t offset;
-
/* Initialize the output. */
output_location (NULL, 0, NULL, NULL);
FOR_EACH_BB (bb)
{
gimple_stmt_iterator gsi;
-
- offset = 0;
+ gcov_position_t offset = 0;
if (bb == ENTRY_BLOCK_PTR->next_bb)
{
@@ -1150,15 +1147,14 @@ branch_prob (void)
&offset, bb);
}
- /* Notice GOTO expressions we eliminated while constructing the
- CFG. */
+ /* Notice GOTO expressions eliminated while constructing the CFG. */
if (single_succ_p (bb)
&& single_succ_edge (bb)->goto_locus != UNKNOWN_LOCATION)
{
- location_t curr_location = single_succ_edge (bb)->goto_locus;
- /* ??? The FILE/LINE API is inconsistent for these cases. */
- output_location (LOCATION_FILE (curr_location),
- LOCATION_LINE (curr_location), &offset, bb);
+ expanded_location curr_location
+ = expand_location (single_succ_edge (bb)->goto_locus);
+ output_location (curr_location.file, curr_location.line,
+ &offset, bb);
}
if (offset)