See comment in the commit for details. It works around a bug that's been reported here: https://bugs.llvm.org/show_bug.cgi?id=45336 This is a separate commit so it can easily be reverted if/when this patch is backported to the LLVM 10 stable branch.