[PATCH] multiple inlining scopes for a single source location

Eric Christopher echristo at gmail.com
Tue Mar 12 11:45:08 PDT 2013


On Tue, Mar 12, 2013 at 11:39 AM, Adrian Prantl <aprantl at apple.com> wrote:

>
> On Mar 6, 2013, at 1:15 PM, Eric Christopher <echristo at gmail.com> wrote:
> > Sorry for the delay, I'm wondering if there's a way to look at the
> location in the backend - even without the column information to make a
> determination here. I'll probably look into it before putting this in
> though.
>
> To summarize the problem:
> LexicalScopes::getOrCreateInlinedScope() uses the DebugLoc as an index
> into InlinedLexicalScopeMap.
> DebugLoc::getFromDILocation(MDNode *N) builds a new DebugLoc from
> LineNumber, ColumnNumber, Scope, and OrigLocation of InlinedAt. In my test
> case, Line, Scope and OrigLocation are all identical for two inlined calls
> to the same function at the same line.
>
>
This is what I was hoping wasn't the case. :(


> Based on this I think (but I may be wrong) that we need to emit a distinct
> location already in the frontend (in CodeGenFunction::EmitCallExpr). The
> backend relies on the DebugLoc to create the lexical scope.
>
> Do you see another way that you would prefer?
>

Unfortunately not at the moment. I guess go ahead then.

Thanks for looking into it.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130312/b310e81e/attachment.html>


More information about the cfe-commits mailing list