[PATCH] D13954: CodeGen: Fix LLVM assertion if Swift and Clang emit Objective-C class reference in same LLVM module

2015-10-21 Thread Slava Pestov via cfe-commits
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 the

Re: [PATCH] D13954: CodeGen: Fix LLVM assertion if Swift and Clang emit Objective-C class reference in same LLVM module

2015-10-24 Thread Slava Pestov via cfe-commits
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(): @"\01OBJC_CLASS_$_NSNumb

Re: [PATCH] D13954: CodeGen: Fix LLVM assertion if Swift and Clang emit Objective-C class reference in same LLVM module

2015-10-24 Thread Slava Pestov via cfe-commits
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