No header files?

Tomas Lindquist Olsen tomas.l.olsen at gmail.com
Thu Oct 22 03:08:05 PDT 2009


On Thu, Oct 22, 2009 at 11:50 AM, Yigal Chripun <yigal100 at gmail.com> wrote:
>
> I think you misunderstood. the idea is *not* to replace .di header files with llvm bit-code files.
> the idea is to replace d object files lib files with a llvm bit-code equivalents  which does not need additional header files.
>
> let's go over the list one more time:
> 1) i can't use obj files from different OSes or even different compilers on the same OS - so definitly *not* platform neutral
> 2) you need to parse a header file in addition to linking functions from the lib file, how is that better than having one file without needing to do any parsing of headers at all?
> 3) like Steve said, there is only one file so you don't get syncing problems between the header and the object file. the bit-code object file already contains all the required metadata and doesn't depend on a separate header file.
> 4)LLVM is already implemented and has all the required tools for its format. ldc for example can take advantage of this easily.
>
>

This locks D to the LLVM backend, things like that is never a good idea.

Also, LLVM bitcode files produced both by LDC and Clang/llvm-gcc are
platform specific. Sure you can process them on any platform, but the
source code they were compiled from was platform specific, and so is
the resulting bitcode. Using LLVM bitcode as a replacement format for
native OMF/COFF/ELF objects, does not give us platform neutrality.

-Tomas



More information about the Digitalmars-d mailing list