[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 19:21:55 PDT 2021
jsji updated this revision to Diff 345660.
jsji marked an inline comment as done.
jsji added a comment.
Address comments.
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.345660.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210516/7e796a6b/attachment.bin>
More information about the llvm-commits
mailing list