rjmccall added a comment.

It just occurred to me that there is a way to test this in Clang with the 
asm-label extension:

  int Foo_class asm("OBJC_CLASS_$_Foo");

Of course, you'll have to actually use it from somewhere, or define it, in 
order for it to actually show up in the IR and cause a conflict.

You should probably also test that we do something sane if the caller is making 
a definition but one already exists.  An error counts as "sane"; just make sure 
you return a GlobalVariable of the right type.  There's model code for this in 
GetOrCreateLLVMFunction, although it's okay for the diagnostic here to be worse 
than that one.


Repository:
  rL LLVM

http://reviews.llvm.org/D13954



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to