[patch] migrating DragonEgg to DIBuilder
Eric Christopher
echristo at gmail.com
Sun Feb 24 14:53:28 PST 2013
Hi Dave,
Looks pretty good, just a few comments:
- DW_TAG_inheritance, findRegion(TYPE_CONTEXT(type)),
+ DW_TAG_inheritance, findRegion(type),
This seems curious?
+ case dwarf::DW_TAG_typedef:
+ // FIXME: Remove this conditional, it's firing at least for member
pointer
+ // fix getOrCreateType to see through member data pointers
Can you expand on this comment (also needs a period) since it's not obvious
what's going on and why?
+ case dwarf::DW_TAG_structure_type:
+ return Builder.createStructType(Context, Name, F, LineNumber,
SizeInBits, AlignInBits, Flags, DerivedFrom, Elements, 0, ContainingType);
80-col?
+ return Builder.createFunction(
+ SP.getContext(), SP.getName(), SP.getLinkageName(), SP.getFile(),
+ SP.getLineNumber(), SP.getType(), SP.isLocalToUnit(), true, LineNo,
+ SP.getFlags(), SP.isOptimized(), Fn, SP.getTemplateParams(), SP);
Awkward formatting?
+ DICompositeType createStructType(
+ DIDescriptor Scope, StringRef Name, DIFile File, unsigned
LineNumber,
+ uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags,
+ DIType DerivedFrom, DIArray Elements, unsigned RunTimeLang = 0,
+ MDNode *VTableHolder = 0);
Ditto.
+DICompositeType DIBuilder::createStructType(
+ DIDescriptor Context, StringRef Name, DIFile File, unsigned LineNumber,
+ uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags,
+ DIType DerivedFrom, DIArray Elements, unsigned RunTimeLang,
+ MDNode *VTableHolder) {
Here too.
Otherwise OK.
-eric
On Sun, Feb 24, 2013 at 10:25 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
>
> On Sun, Feb 24, 2013 at 12:23 AM, Duncan Sands <baldrick at free.fr> wrote:
>
>> Hi David, here is the original commit.
>
>
> Ah, I see - you inherited these test cases from llvm-gcc. Makes sense.
>
>
>> Since dragonegg just uses the provided
>> gcc (i.e. it can't modify gcc), if gcc hasn't set DECL_IGNORED_P then
>> there is
>> nothing that dragonegg can do about it. I've removed the test case.
>> Please
>> feel free to apply your debug info patches.
>>
>
> Great - thanks for your time/thoughts/fixes here. I know Eric mentioned he
> had some thoughts on these patches so I'll wait for him to have a chance &
> then commit these & carry on with my debug info refactoring work. (in doing
> so I'll try to keep an eye on the dragonegg test cases too - though
> I apologize in advance if a few breaks slip through & please do let me know
> if that happens)
>
> - David
>
>
>>
>> Ciao, Duncan.
>>
>> r96974 | dpatel | 2010-02-23 20:36:49 +0100 (Tue, 23 Feb 2010) | 4 lines
>>
>> Do not rely on write_symbols to disable debug info for super class added
>> as an invisible member of derived class. write_symbols controls debug_hooks
>> which are used to emit debug info in various formats in gcc. llvm-gcc does
>> not use this debug_hooks interface to emit debugging information.
>>
>> Test case is at llvm/test/FrontendObjC/2010-**02-23-DbgInheritance.m
>>
>>
>> Index: gcc/toplev.c
>> ==============================**==============================**=======
>> --- gcc/toplev.c (revision 96973)
>> +++ gcc/toplev.c (revision 96974)
>> @@ -1926,6 +1926,8 @@
>>
>> /* LLVM LOCAL begin */
>> #ifdef ENABLE_LLVM
>> + // write_symbols set up debug_hooks. llvm-gcc does not use this hooks
>> + // to emit debug info.
>> write_symbols = NO_DEBUG;
>> #endif
>> /* LLVM LOCAL end */
>> Index: gcc/objc/objc-act.c
>> ==============================**==============================**=======
>> --- gcc/objc/objc-act.c (revision 96973)
>> +++ gcc/objc/objc-act.c (revision 96974)
>> @@ -3407,8 +3407,10 @@
>> DECL_ALIGN (base) = 1;
>> DECL_FIELD_CONTEXT (base) = s;
>> /* APPLE LOCAL begin radar 4477797 */
>> - if (write_symbols == DWARF2_DEBUG)
>> - DECL_IGNORED_P (base) = 1;
>> + /* LLVM LOCAL begin */
>> + /* Do not check write-symbols in llvm-gcc. */
>> + DECL_IGNORED_P (base) = 1;
>> + /* LLVM LOCAL end */
>> /* APPLE LOCAL end radar 4477797 */
>> #ifdef OBJCPLUS
>> DECL_FIELD_IS_BASE (base) = 1;
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130224/12070988/attachment.html>
More information about the llvm-commits
mailing list