[PATCH] D13954: CodeGen: Fix LLVM assertion if Swift and Clang emit Objective-C class reference in same LLVM module
Slava Pestov via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 21 13:00:07 PDT 2015
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 emission of a global variable named OBJC_CLASS_$_<ClassName>. Clang and Swift emit this variable with different types, resulting in an LLVM assertion firing. This patch changes Clang to be more resilient in the case where the global has already been emitted, wrapping it in a cast constexpr instead of crashing.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10772 bytes
Desc: not available
More information about the cfe-commits