Review request: generate DWARF pubnames under a compiler option

Krzysztof Parzyszek kparzysz at codeaurora.org
Mon Feb 11 14:15:01 PST 2013


On 2/11/2013 1:21 PM, Eric Christopher wrote:
>
> Missing a testcase it appears as well? Once you've got a testcase and
> have fixed the above feel free to commit if you have commit privs,
> otherwise send me something. It'd be nice to split out the section
> patches from the dwarfdump and emission patch. Try to make sure in the
> testcase that you cover a good set of what should be in the pubnames
> section and include the .c file in the comments of the testcase so we
> can duplicate it via clang's IR emission.

Interestingly, I had a testcase like that, and it did include the 
original source in the comments.  It just somehow didn't make it to my 
local commiy.  One thing I wasn't sure about it is that I put it in the 
X86-specific test directory.  Here's a snippet explaining why:

; Test this on x86 because it is known to use ELF.  This way we can use
; the actual section name to make sure that the symbol names are defined
; inside of it.
;
; CHECK: pubnames_begin0
; This test will fail if these names are emitted in a different order.
; CHECK: global_namespace_variable
; CHECK: global_namespace_function
; CHECK: static_member_function
; CHECK: global_variable
; CHECK: global_function
; CHECK: member_function
; CHECK: pubnames_end0


There is also the complication related to the order of the names.  Are 
you ok with this, or do you have another suggestion?


Thanks for the review!

-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-commits mailing list