aeubanks updated this revision to Diff 366380.
aeubanks added a comment.

rebase past cleanups


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108013

Files:
  llvm/include/llvm/IR/Attributes.h
  llvm/include/llvm/IR/Function.h
  llvm/include/llvm/IR/InstrTypes.h
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
  llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
  llvm/lib/IR/Attributes.cpp
  llvm/lib/IR/Core.cpp
  llvm/lib/Linker/IRMover.cpp
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
  llvm/lib/Transforms/Utils/FunctionComparator.cpp
  llvm/lib/Transforms/Utils/ValueMapper.cpp

Index: llvm/lib/Transforms/Utils/ValueMapper.cpp
===================================================================
--- llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -947,7 +947,7 @@
       for (Attribute::AttrKind TypedAttr :
              {Attribute::ByVal, Attribute::StructRet, Attribute::ByRef,
               Attribute::InAlloca}) {
-        if (Type *Ty = Attrs.getAttribute(i, TypedAttr).getValueAsType()) {
+        if (Type *Ty = Attrs.getAttributeImpl(i, TypedAttr).getValueAsType()) {
           Attrs = Attrs.replaceAttributeType(C, i, TypedAttr,
                                              TypeMapper->remapType(Ty));
           break;
Index: llvm/lib/Transforms/Utils/FunctionComparator.cpp
===================================================================
--- llvm/lib/Transforms/Utils/FunctionComparator.cpp
+++ llvm/lib/Transforms/Utils/FunctionComparator.cpp
@@ -111,8 +111,8 @@
     return Res;
 
   for (unsigned i = L.index_begin(), e = L.index_end(); i != e; ++i) {
-    AttributeSet LAS = L.getAttributes(i);
-    AttributeSet RAS = R.getAttributes(i);
+    AttributeSet LAS = L.getAttributesImpl(i);
+    AttributeSet RAS = R.getAttributesImpl(i);
     AttributeSet::iterator LI = LAS.begin(), LE = LAS.end();
     AttributeSet::iterator RI = RAS.begin(), RE = RAS.end();
     for (; LI != LE && RI != RE; ++LI, ++RI) {
Index: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -2662,7 +2662,7 @@
     R.addAttribute(Attribute::get(Ctx, Attribute::DereferenceableOrNull,
                                   AH.getDereferenceableOrNullBytes(Index)));
   for (auto Attr : ParamAttrsToStrip)
-    if (AH.getAttributes().hasAttribute(Index, Attr))
+    if (AH.getAttributes().hasAttributeImpl(Index, Attr))
       R.addAttribute(Attr);
 
   if (!R.empty())
Index: llvm/lib/Transforms/IPO/Attributor.cpp
===================================================================
--- llvm/lib/Transforms/IPO/Attributor.cpp
+++ llvm/lib/Transforms/IPO/Attributor.cpp
@@ -382,27 +382,27 @@
 
   if (Attr.isEnumAttribute()) {
     Attribute::AttrKind Kind = Attr.getKindAsEnum();
-    if (Attrs.hasAttribute(AttrIdx, Kind))
+    if (Attrs.hasAttributeImpl(AttrIdx, Kind))
       if (!ForceReplace &&
-          isEqualOrWorse(Attr, Attrs.getAttribute(AttrIdx, Kind)))
+          isEqualOrWorse(Attr, Attrs.getAttributeImpl(AttrIdx, Kind)))
         return false;
     Attrs = Attrs.addAttribute(Ctx, AttrIdx, Attr);
     return true;
   }
   if (Attr.isStringAttribute()) {
     StringRef Kind = Attr.getKindAsString();
-    if (Attrs.hasAttribute(AttrIdx, Kind))
+    if (Attrs.hasAttributeImpl(AttrIdx, Kind))
       if (!ForceReplace &&
-          isEqualOrWorse(Attr, Attrs.getAttribute(AttrIdx, Kind)))
+          isEqualOrWorse(Attr, Attrs.getAttributeImpl(AttrIdx, Kind)))
         return false;
     Attrs = Attrs.addAttribute(Ctx, AttrIdx, Attr);
     return true;
   }
   if (Attr.isIntAttribute()) {
     Attribute::AttrKind Kind = Attr.getKindAsEnum();
-    if (Attrs.hasAttribute(AttrIdx, Kind))
+    if (Attrs.hasAttributeImpl(AttrIdx, Kind))
       if (!ForceReplace &&
-          isEqualOrWorse(Attr, Attrs.getAttribute(AttrIdx, Kind)))
+          isEqualOrWorse(Attr, Attrs.getAttributeImpl(AttrIdx, Kind)))
         return false;
     Attrs = Attrs.removeAttribute(Ctx, AttrIdx, Kind);
     Attrs = Attrs.addAttribute(Ctx, AttrIdx, Attr);
@@ -658,9 +658,9 @@
   else
     AttrList = getAssociatedFunction()->getAttributes();
 
-  bool HasAttr = AttrList.hasAttribute(getAttrIdx(), AK);
+  bool HasAttr = AttrList.hasAttributeImpl(getAttrIdx(), AK);
   if (HasAttr)
-    Attrs.push_back(AttrList.getAttribute(getAttrIdx(), AK));
+    Attrs.push_back(AttrList.getAttributeImpl(getAttrIdx(), AK));
   return HasAttr;
 }
 
Index: llvm/lib/Linker/IRMover.cpp
===================================================================
--- llvm/lib/Linker/IRMover.cpp
+++ llvm/lib/Linker/IRMover.cpp
@@ -651,8 +651,8 @@
     for (Attribute::AttrKind TypedAttr :
          {Attribute::ByVal, Attribute::StructRet, Attribute::ByRef,
           Attribute::InAlloca}) {
-      if (Attrs.hasAttribute(i, TypedAttr)) {
-        if (Type *Ty = Attrs.getAttribute(i, TypedAttr).getValueAsType()) {
+      if (Attrs.hasAttributeImpl(i, TypedAttr)) {
+        if (Type *Ty = Attrs.getAttributeImpl(i, TypedAttr).getValueAsType()) {
           Attrs = Attrs.replaceAttributeType(C, i, TypedAttr, TypeMap.get(Ty));
           break;
         }
Index: llvm/lib/IR/Core.cpp
===================================================================
--- llvm/lib/IR/Core.cpp
+++ llvm/lib/IR/Core.cpp
@@ -2464,13 +2464,13 @@
 }
 
 unsigned LLVMGetAttributeCountAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx) {
-  auto AS = unwrap<Function>(F)->getAttributes().getAttributes(Idx);
+  auto AS = unwrap<Function>(F)->getAttributes().getAttributesImpl(Idx);
   return AS.getNumAttributes();
 }
 
 void LLVMGetAttributesAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx,
                               LLVMAttributeRef *Attrs) {
-  auto AS = unwrap<Function>(F)->getAttributes().getAttributes(Idx);
+  auto AS = unwrap<Function>(F)->getAttributes().getAttributesImpl(Idx);
   for (auto A : AS)
     *Attrs++ = wrap(A);
 }
@@ -2873,14 +2873,14 @@
 unsigned LLVMGetCallSiteAttributeCount(LLVMValueRef C,
                                        LLVMAttributeIndex Idx) {
   auto *Call = unwrap<CallBase>(C);
-  auto AS = Call->getAttributes().getAttributes(Idx);
+  auto AS = Call->getAttributes().getAttributesImpl(Idx);
   return AS.getNumAttributes();
 }
 
 void LLVMGetCallSiteAttributes(LLVMValueRef C, LLVMAttributeIndex Idx,
                                LLVMAttributeRef *Attrs) {
   auto *Call = unwrap<CallBase>(C);
-  auto AS = Call->getAttributes().getAttributes(Idx);
+  auto AS = Call->getAttributes().getAttributesImpl(Idx);
   for (auto A : AS)
     *Attrs++ = wrap(A);
 }
Index: llvm/lib/IR/Attributes.cpp
===================================================================
--- llvm/lib/IR/Attributes.cpp
+++ llvm/lib/IR/Attributes.cpp
@@ -1202,7 +1202,7 @@
   for (unsigned I = 0; I < MaxSize; ++I) {
     AttrBuilder CurBuilder;
     for (const auto &List : Attrs)
-      CurBuilder.merge(List.getAttributes(I - 1));
+      CurBuilder.merge(List.getAttributesImpl(I - 1));
     NewAttrSets[I] = AttributeSet::get(C, CurBuilder);
   }
 
@@ -1211,8 +1211,9 @@
 
 AttributeList AttributeList::addAttribute(LLVMContext &C, unsigned Index,
                                           Attribute::AttrKind Kind) const {
-  if (hasAttribute(Index, Kind)) return *this;
-  AttributeSet Attrs = getAttributes(Index);
+  if (hasAttributeImpl(Index, Kind))
+    return *this;
+  AttributeSet Attrs = getAttributesImpl(Index);
   // TODO: Insert at correct position and avoid sort.
   SmallVector<Attribute, 8> NewAttrs(Attrs.begin(), Attrs.end());
   NewAttrs.push_back(Attribute::get(C, Kind));
@@ -1255,13 +1256,13 @@
 #ifndef NDEBUG
   // FIXME it is not obvious how this should work for alignment. For now, say
   // we can't change a known alignment.
-  const MaybeAlign OldAlign = getAttributes(Index).getAlignment();
+  const MaybeAlign OldAlign = getAttributesImpl(Index).getAlignment();
   const MaybeAlign NewAlign = B.getAlignment();
   assert((!OldAlign || !NewAlign || OldAlign == NewAlign) &&
          "Attempt to change alignment!");
 #endif
 
-  AttrBuilder Merged(getAttributes(Index));
+  AttrBuilder Merged(getAttributesImpl(Index));
   Merged.merge(B);
   return setAttributes(C, Index, AttributeSet::get(C, Merged));
 }
@@ -1288,7 +1289,8 @@
 
 AttributeList AttributeList::removeAttribute(LLVMContext &C, unsigned Index,
                                              Attribute::AttrKind Kind) const {
-  if (!hasAttribute(Index, Kind)) return *this;
+  if (!hasAttributeImpl(Index, Kind))
+    return *this;
 
   Index = attrIdxToArrayIdx(Index);
   SmallVector<AttributeSet, 4> AttrSets(this->begin(), this->end());
@@ -1301,7 +1303,8 @@
 
 AttributeList AttributeList::removeAttribute(LLVMContext &C, unsigned Index,
                                              StringRef Kind) const {
-  if (!hasAttribute(Index, Kind)) return *this;
+  if (!hasAttributeImpl(Index, Kind))
+    return *this;
 
   Index = attrIdxToArrayIdx(Index);
   SmallVector<AttributeSet, 4> AttrSets(this->begin(), this->end());
@@ -1315,7 +1318,7 @@
 AttributeList
 AttributeList::removeAttributes(LLVMContext &C, unsigned Index,
                                 const AttrBuilder &AttrsToRemove) const {
-  AttributeSet Attrs = getAttributes(Index);
+  AttributeSet Attrs = getAttributesImpl(Index);
   AttributeSet NewAttrs = Attrs.removeAttributes(C, AttrsToRemove);
   // If nothing was removed, return the original list.
   if (Attrs == NewAttrs)
@@ -1373,28 +1376,28 @@
 //===----------------------------------------------------------------------===//
 
 AttributeSet AttributeList::getParamAttrs(unsigned ArgNo) const {
-  return getAttributes(ArgNo + FirstArgIndex);
+  return getAttributesImpl(ArgNo + FirstArgIndex);
 }
 
 AttributeSet AttributeList::getRetAttrs() const {
-  return getAttributes(ReturnIndex);
+  return getAttributesImpl(ReturnIndex);
 }
 
 AttributeSet AttributeList::getFnAttrs() const {
-  return getAttributes(FunctionIndex);
+  return getAttributesImpl(FunctionIndex);
 }
 
-bool AttributeList::hasAttribute(unsigned Index,
-                                 Attribute::AttrKind Kind) const {
-  return getAttributes(Index).hasAttribute(Kind);
+bool AttributeList::hasAttributeImpl(unsigned Index,
+                                     Attribute::AttrKind Kind) const {
+  return getAttributesImpl(Index).hasAttribute(Kind);
 }
 
-bool AttributeList::hasAttribute(unsigned Index, StringRef Kind) const {
-  return getAttributes(Index).hasAttribute(Kind);
+bool AttributeList::hasAttributeImpl(unsigned Index, StringRef Kind) const {
+  return getAttributesImpl(Index).hasAttribute(Kind);
 }
 
-bool AttributeList::hasAttributes(unsigned Index) const {
-  return getAttributes(Index).hasAttributes();
+bool AttributeList::hasAttributesImpl(unsigned Index) const {
+  return getAttributesImpl(Index).hasAttributes();
 }
 
 bool AttributeList::hasFnAttr(Attribute::AttrKind Kind) const {
@@ -1402,7 +1405,7 @@
 }
 
 bool AttributeList::hasFnAttr(StringRef Kind) const {
-  return hasAttribute(AttributeList::FunctionIndex, Kind);
+  return hasAttributeImpl(AttributeList::FunctionIndex, Kind);
 }
 
 bool AttributeList::hasAttrSomewhere(Attribute::AttrKind Attr,
@@ -1410,78 +1413,79 @@
   return pImpl && pImpl->hasAttrSomewhere(Attr, Index);
 }
 
-Attribute AttributeList::getAttribute(unsigned Index,
-                                      Attribute::AttrKind Kind) const {
-  return getAttributes(Index).getAttribute(Kind);
+Attribute AttributeList::getAttributeImpl(unsigned Index,
+                                          Attribute::AttrKind Kind) const {
+  return getAttributesImpl(Index).getAttribute(Kind);
 }
 
-Attribute AttributeList::getAttribute(unsigned Index, StringRef Kind) const {
-  return getAttributes(Index).getAttribute(Kind);
+Attribute AttributeList::getAttributeImpl(unsigned Index,
+                                          StringRef Kind) const {
+  return getAttributesImpl(Index).getAttribute(Kind);
 }
 
 MaybeAlign AttributeList::getRetAlignment() const {
-  return getAttributes(ReturnIndex).getAlignment();
+  return getAttributesImpl(ReturnIndex).getAlignment();
 }
 
 MaybeAlign AttributeList::getParamAlignment(unsigned ArgNo) const {
-  return getAttributes(ArgNo + FirstArgIndex).getAlignment();
+  return getAttributesImpl(ArgNo + FirstArgIndex).getAlignment();
 }
 
 MaybeAlign AttributeList::getParamStackAlignment(unsigned ArgNo) const {
-  return getAttributes(ArgNo + FirstArgIndex).getStackAlignment();
+  return getAttributesImpl(ArgNo + FirstArgIndex).getStackAlignment();
 }
 
 Type *AttributeList::getParamByValType(unsigned Index) const {
-  return getAttributes(Index+FirstArgIndex).getByValType();
+  return getAttributesImpl(Index + FirstArgIndex).getByValType();
 }
 
 Type *AttributeList::getParamStructRetType(unsigned Index) const {
-  return getAttributes(Index + FirstArgIndex).getStructRetType();
+  return getAttributesImpl(Index + FirstArgIndex).getStructRetType();
 }
 
 Type *AttributeList::getParamByRefType(unsigned Index) const {
-  return getAttributes(Index + FirstArgIndex).getByRefType();
+  return getAttributesImpl(Index + FirstArgIndex).getByRefType();
 }
 
 Type *AttributeList::getParamPreallocatedType(unsigned Index) const {
-  return getAttributes(Index + FirstArgIndex).getPreallocatedType();
+  return getAttributesImpl(Index + FirstArgIndex).getPreallocatedType();
 }
 
 Type *AttributeList::getParamInAllocaType(unsigned Index) const {
-  return getAttributes(Index + FirstArgIndex).getInAllocaType();
+  return getAttributesImpl(Index + FirstArgIndex).getInAllocaType();
 }
 
 Type *AttributeList::getParamElementType(unsigned Index) const {
-  return getAttributes(Index + FirstArgIndex).getElementType();
+  return getAttributesImpl(Index + FirstArgIndex).getElementType();
 }
 
 MaybeAlign AttributeList::getStackAlignment(unsigned Index) const {
-  return getAttributes(Index).getStackAlignment();
+  return getAttributesImpl(Index).getStackAlignment();
 }
 
 uint64_t AttributeList::getDereferenceableBytes(unsigned Index) const {
-  return getAttributes(Index).getDereferenceableBytes();
+  return getAttributesImpl(Index).getDereferenceableBytes();
 }
 
 uint64_t AttributeList::getDereferenceableOrNullBytes(unsigned Index) const {
-  return getAttributes(Index).getDereferenceableOrNullBytes();
+  return getAttributesImpl(Index).getDereferenceableOrNullBytes();
 }
 
 std::pair<unsigned, Optional<unsigned>>
 AttributeList::getAllocSizeArgs(unsigned Index) const {
-  return getAttributes(Index).getAllocSizeArgs();
+  return getAttributesImpl(Index).getAllocSizeArgs();
 }
 
 std::pair<unsigned, unsigned>
 AttributeList::getVScaleRangeArgs(unsigned Index) const {
-  return getAttributes(Index).getVScaleRangeArgs();
+  return getAttributesImpl(Index).getVScaleRangeArgs();
 }
 
 std::string AttributeList::getAsString(unsigned Index, bool InAttrGrp) const {
-  return getAttributes(Index).getAsString(InAttrGrp);
+  return getAttributesImpl(Index).getAsString(InAttrGrp);
 }
 
-AttributeSet AttributeList::getAttributes(unsigned Index) const {
+AttributeSet AttributeList::getAttributesImpl(unsigned Index) const {
   Index = attrIdxToArrayIdx(Index);
   if (!pImpl || Index >= getNumAttrSets())
     return {};
@@ -1516,7 +1520,7 @@
   O << "AttributeList[\n";
 
   for (unsigned i = index_begin(), e = index_end(); i != e; ++i) {
-    if (!getAttributes(i).hasAttributes())
+    if (!getAttributesImpl(i).hasAttributes())
       continue;
     O << "  { ";
     switch (i) {
@@ -1545,7 +1549,7 @@
 
 // FIXME: Remove this ctor, use AttributeSet.
 AttrBuilder::AttrBuilder(AttributeList AL, unsigned Index) {
-  AttributeSet AS = AL.getAttributes(Index);
+  AttributeSet AS = AL.getAttributesImpl(Index);
   for (const auto &A : AS)
     addAttribute(A);
 }
@@ -1628,7 +1632,7 @@
 }
 
 AttrBuilder &AttrBuilder::removeAttributes(AttributeList A, uint64_t Index) {
-  remove(A.getAttributes(Index));
+  remove(A.getAttributesImpl(Index));
   return *this;
 }
 
@@ -1840,7 +1844,7 @@
 }
 
 bool AttrBuilder::hasAttributes(AttributeList AL, uint64_t Index) const {
-  AttributeSet AS = AL.getAttributes(Index);
+  AttributeSet AS = AL.getAttributesImpl(Index);
 
   for (const auto &Attr : AS) {
     if (Attr.isEnumAttribute() || Attr.isIntAttribute()) {
Index: llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
===================================================================
--- llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
+++ llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
@@ -73,7 +73,7 @@
                                              const AttributeList &Attrs,
                                              unsigned OpIdx) const {
   addFlagsUsingAttrFn(Flags, [&Attrs, &OpIdx](Attribute::AttrKind Attr) {
-    return Attrs.hasAttribute(OpIdx, Attr);
+    return Attrs.hasAttributeImpl(OpIdx, Attr);
   });
 }
 
@@ -167,7 +167,7 @@
     assert(OpIdx >= AttributeList::FirstArgIndex);
     Type *ElementTy = PtrTy->getElementType();
 
-    auto Ty = Attrs.getAttribute(OpIdx, Attribute::ByVal).getValueAsType();
+    auto Ty = Attrs.getAttributeImpl(OpIdx, Attribute::ByVal).getValueAsType();
     Flags.setByValSize(DL.getTypeAllocSize(Ty ? Ty : ElementTy));
 
     // For ByVal, alignment should be passed from FE.  BE will guess if
Index: llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
===================================================================
--- llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -1037,7 +1037,7 @@
 
   // Do lookups for all attribute groups.
   for (unsigned i = PAL.index_begin(), e = PAL.index_end(); i != e; ++i) {
-    AttributeSet AS = PAL.getAttributes(i);
+    AttributeSet AS = PAL.getAttributesImpl(i);
     if (!AS.hasAttributes())
       continue;
     IndexAndAttrSet Pair = {i, AS};
Index: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -836,7 +836,7 @@
   for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
     AttributeList AL = Attrs[i];
     for (unsigned i = AL.index_begin(), e = AL.index_end(); i != e; ++i) {
-      AttributeSet AS = AL.getAttributes(i);
+      AttributeSet AS = AL.getAttributesImpl(i);
       if (AS.hasAttributes())
         Record.push_back(VE.getAttributeGroupID({i, AS}));
     }
Index: llvm/include/llvm/IR/InstrTypes.h
===================================================================
--- llvm/include/llvm/IR/InstrTypes.h
+++ llvm/include/llvm/IR/InstrTypes.h
@@ -1585,12 +1585,12 @@
 
   /// Get the attribute of a given kind at a position.
   Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const {
-    return getAttributes().getAttribute(i, Kind);
+    return getAttributes().getAttributeImpl(i, Kind);
   }
 
   /// Get the attribute of a given kind at a position.
   Attribute getAttribute(unsigned i, StringRef Kind) const {
-    return getAttributes().getAttribute(i, Kind);
+    return getAttributes().getAttributeImpl(i, Kind);
   }
 
   /// Get the attribute of a given kind from a given arg
Index: llvm/include/llvm/IR/Function.h
===================================================================
--- llvm/include/llvm/IR/Function.h
+++ llvm/include/llvm/IR/Function.h
@@ -442,7 +442,7 @@
 
   /// check if an attributes is in the list of attributes.
   bool hasAttribute(unsigned i, Attribute::AttrKind Kind) const {
-    return getAttributes().hasAttribute(i, Kind);
+    return getAttributes().hasAttributeImpl(i, Kind);
   }
 
   /// check if an attributes is in the list of attributes.
@@ -462,12 +462,12 @@
 
   /// gets the attribute from the list of attributes.
   Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const {
-    return AttributeSets.getAttribute(i, Kind);
+    return AttributeSets.getAttributeImpl(i, Kind);
   }
 
   /// gets the attribute from the list of attributes.
   Attribute getAttribute(unsigned i, StringRef Kind) const {
-    return AttributeSets.getAttribute(i, Kind);
+    return AttributeSets.getAttributeImpl(i, Kind);
   }
 
   /// adds the dereferenceable attribute to the list of attributes.
Index: llvm/include/llvm/IR/Attributes.h
===================================================================
--- llvm/include/llvm/IR/Attributes.h
+++ llvm/include/llvm/IR/Attributes.h
@@ -559,7 +559,7 @@
                                                     unsigned ArgNo,
                                                     Attribute::AttrKind Kind,
                                                     Type *ReplacementTy) const {
-    Attribute Attr = getAttribute(ArgNo, Kind);
+    Attribute Attr = getAttributeImpl(ArgNo, Kind);
     auto Attrs = removeAttribute(C, ArgNo, Kind);
     return Attrs.addAttribute(C, ArgNo, Attr.getWithNewType(C, ReplacementTy));
   }
@@ -616,7 +616,7 @@
   //===--------------------------------------------------------------------===//
 
   /// The attributes for the specified index are returned.
-  AttributeSet getAttributes(unsigned Index) const;
+  AttributeSet getAttributesImpl(unsigned Index) const;
 
   /// The attributes for the argument or parameter at the given index are
   /// returned.
@@ -629,41 +629,41 @@
   AttributeSet getFnAttrs() const;
 
   /// Return true if the attribute exists at the given index.
-  bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const;
+  bool hasAttributeImpl(unsigned Index, Attribute::AttrKind Kind) const;
 
   /// Return true if the attribute exists at the given index.
-  bool hasAttribute(unsigned Index, StringRef Kind) const;
+  bool hasAttributeImpl(unsigned Index, StringRef Kind) const;
 
   /// Return true if attribute exists at the given index.
-  bool hasAttributes(unsigned Index) const;
+  bool hasAttributesImpl(unsigned Index) const;
 
   /// Return true if the attribute exists for the given argument
   bool hasParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) const {
-    return hasAttribute(ArgNo + FirstArgIndex, Kind);
+    return hasAttributeImpl(ArgNo + FirstArgIndex, Kind);
   }
 
   /// Return true if the attribute exists for the given argument
   bool hasParamAttr(unsigned ArgNo, StringRef Kind) const {
-    return hasAttribute(ArgNo + FirstArgIndex, Kind);
+    return hasAttributeImpl(ArgNo + FirstArgIndex, Kind);
   }
 
   /// Return true if attributes exists for the given argument
   bool hasParamAttrs(unsigned ArgNo) const {
-    return hasAttributes(ArgNo + FirstArgIndex);
+    return hasAttributesImpl(ArgNo + FirstArgIndex);
   }
 
   /// Return true if the attribute exists for the return value.
   bool hasRetAttr(Attribute::AttrKind Kind) const {
-    return hasAttribute(ReturnIndex, Kind);
+    return hasAttributeImpl(ReturnIndex, Kind);
   }
 
   /// Return true if the attribute exists for the return value.
   bool hasRetAttr(StringRef Kind) const {
-    return hasAttribute(ReturnIndex, Kind);
+    return hasAttributeImpl(ReturnIndex, Kind);
   }
 
   /// Return true if attributes exist for the return value.
-  bool hasRetAttrs() const { return hasAttributes(ReturnIndex); }
+  bool hasRetAttrs() const { return hasAttributesImpl(ReturnIndex); }
 
   /// Return true if the attribute exists for the function.
   bool hasFnAttr(Attribute::AttrKind Kind) const;
@@ -672,7 +672,7 @@
   bool hasFnAttr(StringRef Kind) const;
 
   /// Return true the attributes exist for the function.
-  bool hasFnAttrs() const { return hasAttributes(FunctionIndex); }
+  bool hasFnAttrs() const { return hasAttributesImpl(FunctionIndex); }
 
   /// Return true if the specified attribute is set for at least one
   /// parameter or for the return value. If Index is not nullptr, the index
@@ -681,29 +681,29 @@
                         unsigned *Index = nullptr) const;
 
   /// Return the attribute object that exists at the given index.
-  Attribute getAttribute(unsigned Index, Attribute::AttrKind Kind) const;
+  Attribute getAttributeImpl(unsigned Index, Attribute::AttrKind Kind) const;
 
   /// Return the attribute object that exists at the given index.
-  Attribute getAttribute(unsigned Index, StringRef Kind) const;
+  Attribute getAttributeImpl(unsigned Index, StringRef Kind) const;
 
   /// Return the attribute object that exists at the arg index.
   Attribute getParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) const {
-    return getAttribute(ArgNo + FirstArgIndex, Kind);
+    return getAttributeImpl(ArgNo + FirstArgIndex, Kind);
   }
 
   /// Return the attribute object that exists at the given index.
   Attribute getParamAttr(unsigned ArgNo, StringRef Kind) const {
-    return getAttribute(ArgNo + FirstArgIndex, Kind);
+    return getAttributeImpl(ArgNo + FirstArgIndex, Kind);
   }
 
   /// Return the attribute object that exists for the function.
   Attribute getFnAttr(Attribute::AttrKind Kind) const {
-    return getAttribute(FunctionIndex, Kind);
+    return getAttributeImpl(FunctionIndex, Kind);
   }
 
   /// Return the attribute object that exists for the function.
   Attribute getFnAttr(StringRef Kind) const {
-    return getAttribute(FunctionIndex, Kind);
+    return getAttributeImpl(FunctionIndex, Kind);
   }
 
   /// Return the alignment of the return value.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to