[PATCH] DebugInfo: Emit info for constant expressions in template arguments
David Blaikie
dblaikie at gmail.com
Tue Aug 20 23:47:46 PDT 2013
On Tue, Aug 20, 2013 at 11:41 PM, David Majnemer
<david.majnemer at gmail.com> wrote:
>
> No, they 'X' and 'G' are not the same in GDB.
>
> (gdb) p X
> $1 = (const _GUID *) 0x4005f0 <_GUID_12345678_1234_1234_1234_1234567890ab>
> (gdb) p G
> $2 = <optimized out>
OK, so as irrelevant as this all is - I wouldn't mind sitting down
with you to figure out what's different here.
My first guess is that my implementation in LLVM special cases some
certain llvm::Value types & ignores the rest, so you'll probably find
that in the dwarfdump the non-type template parameter has no value or
location (compare an int* non-type template parameter, for example) &
maybe we can generalize that handling a bit further to handle this.
>
>
> ================
> Comment at: test/CodeGenCXX/debug-info-template.cpp:102
> @@ +101,3 @@
> +struct __declspec(uuid("{12345678-1234-1234-1234-1234567890ab}")) uuid;
> +template <const struct _GUID *>
> +struct tmpl_guid {
> ----------------
> David Blaikie wrote:
>> Do you need the 'struct' keyword here? I assume not.
> We do, otherwise we error out with "error: unknown type name '_GUID'"
Fair enough - up to you, but I'd probably put a "struct _GUID;"
somewhere up above instead.
More information about the cfe-commits
mailing list