[llvm] 9197959 - [ArgPromotion] Move ArgPart and OffsetAndArgPart to anonymous namespace

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 09:52:29 PDT 2022


Author: Pavel Samolysov
Date: 2022-04-28T09:51:46-07:00
New Revision: 9197959e131ec5e833c02afd0b3e4024f8236a12

URL: https://github.com/llvm/llvm-project/commit/9197959e131ec5e833c02afd0b3e4024f8236a12
DIFF: https://github.com/llvm/llvm-project/commit/9197959e131ec5e833c02afd0b3e4024f8236a12.diff

LOG: [ArgPromotion] Move ArgPart and OffsetAndArgPart to anonymous namespace

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

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D124617

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index 81faf2a1b04a7..65bc392dea31b 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -89,6 +89,8 @@ STATISTIC(NumArgumentsPromoted, "Number of pointer arguments promoted");
 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 @@ struct ArgPart {
   /// 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


        


More information about the llvm-commits mailing list