Ah, good catch.  That is not right.  If there’s inlined function information, 
you want to make sure you haven’t gone from one inlined function to another.  
But the symbol is always going to be the same in this case.

Actually, the old code is a overly restrictive by comparing the blocks 
directly.  What you really want to test is that if either side is in an inlined 
function, both sides are still inside the same inlined function instantiation.  
We should really compare the ContainingInlinedBlock of the current blocks if 
there is inlined info.

This stuff is a PITA to write tests for, too, since it is hard to predict how 
the compiler will emit inlined code...

Jim

> On Nov 17, 2016, at 1:13 PM, Sam McCall <sammcc...@google.com> wrote:
> 
> Thanks. I just noticed, this also changes the behavior (now returns true) if:
>  - comp_unit and function both match
>  - block->GetInlinedFunctionInfo != nullptr
>  - blocks aren't equal
>  - symbols are equal
> 
> Is this correct? Otherwise I'll fix this case to match the old behavior.
> 
> On Thu, Nov 17, 2016 at 10:09 PM, Jim Ingham <jing...@apple.com 
> <mailto:jing...@apple.com>> wrote:
> jingham accepted this revision.
> jingham added a comment.
> This revision is now accepted and ready to land.
> 
> That way of doing it is fine too.
> 
> 
> https://reviews.llvm.org/D26804 <https://reviews.llvm.org/D26804>
> 
> 
> 
> 

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to