diff mbox

[GOOGLE] use expand_location when checking same_line_p

Message ID CAO2gOZWkp6S05ukHFhjO1CTh6svTrkraX5UO21ygB-sLn_Gheg@mail.gmail.com
State New
Headers show

Commit Message

Dehao Chen July 1, 2013, 11:22 p.m. UTC
This patch replaces expand_location_to_spelling_point with
expand_location so that macros will not be expanded.

Bootstrapped and passed regression test.

OK for google-4_8 branch?

Thanks,
Dehao

Comments

Cary Coutant July 1, 2013, 11:28 p.m. UTC | #1
> This patch replaces expand_location_to_spelling_point with
> expand_location so that macros will not be expanded.

I'm confused. Doesn't this just undo the fix you made a month ago? How
does this not break discriminator assignment?

-cary
Dehao Chen July 1, 2013, 11:46 p.m. UTC | #2
This patch does not break the regression test. And because the final
assembly is emitted with "expand_location" instead of
"expand_location_to_spelling_point", thus when we check same_line_p,
it should also reflect this.

Dehao

On Mon, Jul 1, 2013 at 4:28 PM, Cary Coutant <ccoutant@google.com> wrote:
>> This patch replaces expand_location_to_spelling_point with
>> expand_location so that macros will not be expanded.
>
> I'm confused. Doesn't this just undo the fix you made a month ago? How
> does this not break discriminator assignment?
>
> -cary
Cary Coutant July 2, 2013, 8:58 p.m. UTC | #3
>>> This patch replaces expand_location_to_spelling_point with
>>> expand_location so that macros will not be expanded.

OK for google/gcc-4_8.

-cary
diff mbox

Patch

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c (revision 200584)
+++ gcc/tree-cfg.c (working copy)
@@ -732,8 +732,8 @@  same_line_p (location_t locus1, location_t locus2)
   if (locus1 == locus2)
     return true;

-  from = expand_location_to_spelling_point (locus1);
-  to = expand_location_to_spelling_point (locus2);
+  from = expand_location (locus1);
+  to = expand_location (locus2);

   if (from.line != to.line)
     return false;