[LLVMdev] Hi, people, I propose to move Debug and Object File related headers out of Support

Charles Davis cdavis5x at gmail.com
Fri Jul 5 10:18:19 PDT 2013


On Jul 5, 2013, at 10:17 AM, Ahmed Bougacha wrote:

> On Thu, Jul 4, 2013 at 10:21 PM, Charles Davis <cdavis5x at gmail.com> wrote:
> 
> On Jul 4, 2013, at 10:22 PM, 罗勇刚(Yonggang Luo) wrote:
> 
>> 
>> 在 2013-7-4 下午8:53,"Charles Davis" <cdavis5x at gmail.com>写道:
>> >
>> >
>> > On Jul 4, 2013, at 1:43 AM, 罗勇刚(Yonggang Luo) wrote:
>> >
>> > > LLVM is a modularized software system, so I hope it's was modularized,
>> > > And ELF.h is definitely belongs to Object by classification,
>> > > The things that confused me is the ELF.h was placed under Support and
>> > > don't know why.
>> > Because it's also used by the MC layer's direct object emission support.
>> thanks for your response, did MC layer's direct object emission depends on Object library?
>> 
> Nope. The Object library only reads object files. MC, on the other hand, only writes object files.
> 
> That’s true for object emission, but MC already depends on libObject,
Huh. You're right, looking at MC's LLVMBuild.txt file.
> and at least some of the more experimental parts of MC actually use it to read files.
That's right, the new object disassembler stuff (that you are working on, if I'm not mistaken!) that was just added needs libObject.

But as for debug info, it is true that DebugInfo only knows how to read it, and CodeGen knows how to write it (but not read it). So for now, the DWARF stuff at least definitely needs to stay in Support.
> 
> However, - I believe nobody mentioned this - I think the point of having ELF.h and friends in Support is that they’re intended to (more or less exactly) match the headers provided by the system.
Agreed, though I'm not sure if that justifies them being in Support instead of Object.
> Most of what’s there is duplicated in a friendlier form (for ObjectFile-related stuff), or just to match the LLVM style (notably Object/MachOFormat.h) in Object.
I have to say, I believe that this duplication is an (admittedly minor) problem, because now at least <llvm/Support/MachO.h> and <llvm/Object/MachOFormat.h> are out of sync. I think we should get rid of one in favor of the other. Personally, I want to keep the former and dump the latter, but LLVM uses mostly the latter when it needs to work with Mach-O files, so I'm not sure how the rest of the community feels--which header stays and which one goes, where the header should go, or if this is even a bike shed they'd want to repaint.

Chip

> 
> -- Ahmed Bougacha
>  
> Chip
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130705/f1bbe197/attachment.html>


More information about the llvm-dev mailing list