LLVM Diagnostic reporting for global variables


I was looking at llvm Diagnostics reporting API and it seems that there is no API present for diagnostic reporting of global variables (I mean the GV itself and not the instructions that use the GV). What’s the reason for that? Why can’t we have a constructor for DiagnosticInfoWithLocationBase() that takes a GV instead of function? Or am I missing something here?

Thanks and Regards,