[PATCH] D124617: [ArgPromotion] Move ArgPart and OffsetAndArgPart to anonymous namespace

Pavel Samolysov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 07:41:25 PDT 2022


psamolysov created this revision.
psamolysov added reviewers: nikic, jdoerfert, aeubanks.
psamolysov added a project: LLVM.
Herald added subscribers: ormris, hiraditya.
Herald added a project: All.
psamolysov requested review of this revision.
Herald added a subscriber: llvm-commits.

The structure ArgPart and alias OffsetAndArgPart have been moved
into the anonymous namespace. NFC.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124617

Files:
  llvm/lib/Transforms/IPO/ArgumentPromotion.cpp


Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
===================================================================
--- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -89,6 +89,8 @@
 STATISTIC(NumByValArgsPromoted, "Number of byval arguments promoted");
 STATISTIC(NumArgumentsDead, "Number of dead pointer args eliminated");
 
+namespace {
+
 struct ArgPart {
   Type *Ty;
   Align Alignment;
@@ -96,8 +98,11 @@
   /// metadata transfer.
   LoadInst *MustExecLoad;
 };
+
 using OffsetAndArgPart = std::pair<int64_t, ArgPart>;
 
+} // end anonymous namespace
+
 static Value *createByteGEP(IRBuilderBase &IRB, const DataLayout &DL,
                             Value *Ptr, Type *ResElemTy, int64_t Offset) {
   // For non-opaque pointers, try to create a "nice" GEP if possible, otherwise


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124617.425773.patch
Type: text/x-patch
Size: 846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220428/72f69614/attachment.bin>


More information about the llvm-commits mailing list