diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -2183,6 +2183,15 @@ report_fatal_error("Encountered a global variable kind that is " "not supported yet."); + // Print GV in verbose mode + if (isVerbose()) { + if (GV->hasInitializer()) { + GV->printAsOperand(OutStreamer->GetCommentOS(), + /*PrintType=*/false, GV->getParent()); + OutStreamer->GetCommentOS() << '\n'; + } + } + MCSectionXCOFF *Csect = cast( getObjFileLowering().SectionForGlobal(GV, GVKind, TM));