In the process of developing a mechanism for efficient virtual method calls in Loci I came across difficulties related to generating the appropriate assembly via LLVM IR. For more information, read the LLVM mailing list discussion.
Fortunately it turns out LLVM has been adding the required features recently, one of which is the ‘nest’ attribute that’s designed to be used for GCC’s nested functions extension to C (Clang needs to be compatible with GCC). The only issue was that while full support is already present for x86 32-bit and 64-bit, the ‘nest’ attribute wasn’t implemented on the LLVM ARM 32-bit backend or AArch64 backend.
Hence I created patches forĀ ARM and AArch64 and these have now been accepted and both committed to LLVM. Separately support has also been implemented for PowerPC. These will all be going into LLVM 3.7.