[PATCH] D102534: [AIX][AsmPrinter] Print Global Variable in comments

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 15 20:25:43 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b91f96a3e29: [AIX][AsmPrinter] Print Global Variable in comments (authored by jsji).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102534/new/

https://reviews.llvm.org/D102534

Files:
  llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ 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<MCSectionXCOFF>(
       getObjFileLowering().SectionForGlobal(GV, GVKind, TM));
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102534.345663.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210516/7c424711/attachment.bin>


More information about the llvm-commits mailing list