[llvm] d5ff5ef - [NFC] One more AttributeList::getAttribute(FunctionIndex) -> getFnAttr()

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 13 16:49:43 PDT 2021


Author: Arthur Eubanks
Date: 2021-08-13T16:49:05-07:00
New Revision: d5ff5ef65e1b66adf01e3c647c76578821338030

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

LOG: [NFC] One more AttributeList::getAttribute(FunctionIndex) -> getFnAttr()

Added: 
    

Modified: 
    llvm/lib/IR/Statepoint.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/Statepoint.cpp b/llvm/lib/IR/Statepoint.cpp
index bbfbbe489bae..b5916e4937c6 100644
--- a/llvm/lib/IR/Statepoint.cpp
+++ b/llvm/lib/IR/Statepoint.cpp
@@ -26,16 +26,14 @@ StatepointDirectives
 llvm::parseStatepointDirectivesFromAttrs(AttributeList AS) {
   StatepointDirectives Result;
 
-  Attribute AttrID =
-      AS.getAttribute(AttributeList::FunctionIndex, "statepoint-id");
+  Attribute AttrID = AS.getFnAttr("statepoint-id");
   uint64_t StatepointID;
   if (AttrID.isStringAttribute())
     if (!AttrID.getValueAsString().getAsInteger(10, StatepointID))
       Result.StatepointID = StatepointID;
 
   uint32_t NumPatchBytes;
-  Attribute AttrNumPatchBytes = AS.getAttribute(AttributeList::FunctionIndex,
-                                                "statepoint-num-patch-bytes");
+  Attribute AttrNumPatchBytes = AS.getFnAttr("statepoint-num-patch-bytes");
   if (AttrNumPatchBytes.isStringAttribute())
     if (!AttrNumPatchBytes.getValueAsString().getAsInteger(10, NumPatchBytes))
       Result.NumPatchBytes = NumPatchBytes;


        


More information about the llvm-commits mailing list