[PATCH] D14350: [FunctionAttrs] Fix an iterator wraparound bug
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 4 19:43:23 PST 2015
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM. Minor comment below on an improved structured, but the current code is correct and strictly better than what we have.
================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:446
@@ +445,3 @@
+ bool InVarArgSection = false;
+ for (CallSite::arg_iterator A = B; A != E; ++A) {
+ InVarArgSection |= (AI == AE);
----------------
I think this would be far clearer as:
for (non var arg arguments) { do previous code)
for (var arg arguments) { return nope! }
http://reviews.llvm.org/D14350
More information about the llvm-commits
mailing list