[PATCH] multiple inlining scopes for a single source location

Adrian Prantl aprantl at apple.com
Tue Mar 5 11:19:52 PST 2013


On Mar 5, 2013, at 10:59 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Sat, Mar 2, 2013 at 3:53 AM, Adrian Prantl <aprantl at apple.com> wrote:
>> On Wed Feb 27 12:45:37 Manman Ren wrote:
>>> Given an example with two function calls in a single line, without -gcolumn-info, both function calls will be at the same source location.
>>> And Clang will generate a single coalesced inlining scope since we unique scopes by the source location.
>>> 
>>> Even without -gcolumn-info, we should generate two inlining scopes. This means we should differentiate the different call sites with the same source location.
>>> One option is to use the column info in SourceLoc to store the call site id when -gcolumn-info is not on.
>>> 
>>> Any problem with this? Any other better suggestions?
>> 
>> Here’s a patch for review that implements this. I’m using the actual column info rather than the (arbitrary?) call site id.
> 
> +  /// \arg force -- assume DebugColumnInfo option is true.
> +  void EmitLocation(CGBuilderTy &Builder, SourceLocation Loc,
> +		    bool forceColumnInfo = false);
> 
> +  /// \arg force -- assume DebugColumnInfo option is true.
> +  unsigned getColumnNumber(SourceLocation Loc, bool force=false);
> 
> Please use \param (it is conventionally used in our codebase), a full
> name of the parameter, and no dashes.
> 
> Also, parameter names should start with a capital letter.

Done. Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Force-column-info-to-be-generated-for-call-expressio.patch
Type: application/octet-stream
Size: 5934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130305/76dc002f/attachment.obj>


More information about the cfe-commits mailing list