On Jan 24, 2008 3:31 AM, Duncan Sands <[EMAIL PROTECTED]> wrote:
>
> On Thursday 24 January 2008 08:45:28 Bill Wendling wrote:
> > Hi Duncan,
> >
> > >> GCC barfs this to the .s file directly:
> > >>
> > >>     .objc_class_name_CrashTestPlugin=0
> > >>     .globl .objc_class_name_CrashTestPlugin
> > >
> > > it looks like you write this directly to a file
> > > containing LLVM IR.  I guess this is OK as long
> > > as no-one is using the global in the IR (otherwise
> > > the verifier will barf).  Is that the case?
> > >
> > This is what I understand to be happening. The GCC version of this
> > doesn't even create a tree node for these, so it shouldn't be
> > generating a use of it. I'm taking that to imply that the GCC to LLVM
> > converter won't create a use of it.
>
> Does this work whether writing LLVM assembler or
> LLVM bitcode?
>
This is how it's output to the .ll file:

module asm "\09.objc_class_name_Sub2=0"
module asm "\09.globl .objc_class_name_Sub2"

So yes. Note that this is something already being done. See the
ASM_DECLARE_UNRESOLVED_REFERENCE macro in the gcc/config/darwin.h
file.

-bw
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to