[PATCH] D7895: Anonymous namespaces are missing import DW_TAG_imported_module.

Robinson, Paul via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 10:40:55 PDT 2015


With my copy of Clang, the two parameters have entirely different types.

DWARF is describing the mapping of source to object. The two parameters have different types. They have separate locations. When you're stopped at a place where the parameters are in-scope, the location tells you where to find them.  There's no ABI knowledge inherent in any of this.
--paulr

From: David Blaikie [mailto:dblaikie at gmail.com]
Sent: Tuesday, August 18, 2015 10:36 AM
To: Robinson, Paul
Cc: reviews+D7895+public+7827be49c0b04087 at reviews.llvm.org; Romanova, Katya; Eric Christopher; Frédéric Riss; Duncan P. N. Exon Smith; llvm-commits
Subject: Re: [PATCH] D7895: Anonymous namespaces are missing import DW_TAG_imported_module.



On Tue, Aug 18, 2015 at 10:28 AM, Robinson, Paul <Paul_Robinson at playstation.sony.com<mailto:Paul_Robinson at playstation.sony.com>> wrote:
Sorry I wasn't clear - I was referring to the ABI lowering of C++ by value parameters.

struct foo { foo(const foo&); int i; };
struct bar { int i; };
void func(foo, bar) { }

foo and bar are passed quite differently in the ABI
And the formal parameters are described quite differently in the DWARF,

What differences are you referring to? They're described quite the same. The only difference in the two parameters is their DW_AT_location, and you can't rely on that for the calling convention - it just describes where to find the variable once you're past the prologue. In LLVM, that's often /just/ the alloca we copy the value into, not the register the parameter was passed in.



meaning the debugger doesn't need special knowledge of the ABI to interpret the DWARF correctly.  I still don't see how this is relevant to the discussion at hand.
--paulr


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150818/18a2ea4a/attachment.html>


More information about the llvm-commits mailing list