slavapestov added a subscriber: slavapestov.
slavapestov added a comment.
Unfortunately the asm label attribute doesn’t seem to work in this case, at
least on Darwin. I get two symbols in the IR, with the asm label having the \01
prefix from MangleContext::mangleName():
Unfortunately the asm label attribute doesn’t seem to work in this case, at
least on Darwin. I get two symbols in the IR, with the asm label having the \01
prefix from MangleContext::mangleName():
@"\01OBJC_CLASS_$_NSNumber" = common global %struct.art_class* null, align 8
slavapestov created this revision.
slavapestov added a reviewer: cfe-commits.
slavapestov set the repository for this revision to rL LLVM.
This patch fixes an issue that can come up when Swift and Clang are emitting
declarations into the same LLVM module.
Objective-C class literals result in
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