See bug 46285
This is an incomplete change - it requires access to AsmPrinter::emitInlineAsm which is currently defined as private in AsmPrinter.h.
If you think this change is fine I'll create a separate fix to make this function accessible in subclasses.