[PATCH] D78507: [llvm][NFC][CallSite] Remove CallSite from Lint.cpp

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 10:48:28 PDT 2020


mtrofin created this revision.
mtrofin added reviewers: dblaikie, craig.topper.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

The CallSite arg iterator is really User::op_iterator.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78507

Files:
  llvm/lib/Analysis/Lint.cpp


Index: llvm/lib/Analysis/Lint.cpp
===================================================================
--- llvm/lib/Analysis/Lint.cpp
+++ llvm/lib/Analysis/Lint.cpp
@@ -49,7 +49,6 @@
 #include "llvm/Analysis/ValueTracking.h"
 #include "llvm/IR/Argument.h"
 #include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/CallSite.h"
 #include "llvm/IR/Constant.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DataLayout.h"
@@ -249,7 +248,7 @@
     // Check argument types (in case the callee was casted) and attributes.
     // TODO: Verify that caller and callee attributes are compatible.
     Function::arg_iterator PI = F->arg_begin(), PE = F->arg_end();
-    CallSite::arg_iterator AI = I.arg_begin(), AE = I.arg_end();
+    auto AI = I.arg_begin(), AE = I.arg_end();
     for (; AI != AE; ++AI) {
       Value *Actual = *AI;
       if (PI != PE) {
@@ -265,8 +264,7 @@
         if (Formal->hasNoAliasAttr() && Actual->getType()->isPointerTy()) {
           AttributeList PAL = I.getAttributes();
           unsigned ArgNo = 0;
-          for (CallSite::arg_iterator BI = I.arg_begin(); BI != AE;
-               ++BI, ++ArgNo) {
+          for (auto BI = I.arg_begin(); BI != AE; ++BI, ++ArgNo) {
             // Skip ByVal arguments since they will be memcpy'd to the callee's
             // stack so we're not really passing the pointer anyway.
             if (PAL.hasParamAttribute(ArgNo, Attribute::ByVal))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78507.258790.patch
Type: text/x-patch
Size: 1410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200420/3a0fdb67/attachment.bin>


More information about the llvm-commits mailing list