[PATCH] D14350: [FunctionAttrs] Fix an iterator wraparound bug

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 14:40:22 PST 2015


reames added inline comments.

================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:445
@@ -444,2 +444,3 @@
       CallSite::arg_iterator B = CS.arg_begin(), E = CS.arg_end();
-      for (CallSite::arg_iterator A = B; A != E; ++A, ++AI) {
+      bool InVarArgSection = false;
+      for (CallSite::arg_iterator A = B; A != E; ++A) {
----------------
I would rather we just gave up on VarArg callsites unless you have a compelling reason we need to handle them here.  Return a conservative answer, and let someone else refine it later.

p.s. Does the other patch have the same issue?


http://reviews.llvm.org/D14350





More information about the llvm-commits mailing list