The Linux kernel makes use of %c<digit> "output template" in extended
inline assembly, particularly with asm goto for static key runtime
patching. The inline assembly uses the address of a global variable as
input to the extended inline assembly.
There's generic handling of %c in AsmPrinter::PrintAsmOperand() for
immediates. I considered extending support for global addresses there,
but it seems that X86AsmPrinter::PrintAsmOperand() has quite a bit of
custom logic for printing global addresses (see printSymbolOperand() in
X86AsmPrinter.cpp).
Fixes: https://bugs.llvm.org/show_bug.cgi?id=41402
Link: https://gcc.gnu.org/onlinedocs/gccint/Output-Template.html#Output-Template
I think this comment will need updating to mention that the implementation of 'c' is split between AsmPrinter::PrintAsmOperand and this function,