[llvm] r252389 - [FunctionAttrs] Add comment and clarify assertion message; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 17:56:08 PST 2015
Author: sanjoy
Date: Fri Nov 6 19:56:07 2015
New Revision: 252389
URL: http://llvm.org/viewvc/llvm-project?rev=252389&view=rev
Log:
[FunctionAttrs] Add comment and clarify assertion message; NFC
Modified:
llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=252389&r1=252388&r2=252389&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Fri Nov 6 19:56:07 2015
@@ -457,7 +457,12 @@ determinePointerReadAttrs(Argument *A,
unsigned UseIndex = std::distance(CS.arg_begin(), U);
- assert(UseIndex < CS.data_operands_size() && "Non-argument use?");
+ // U cannot be the callee operand use: since we're exploring the
+ // transitive uses of an Argument, having such a use be a callee would
+ // imply the CallSite is an indirect call or invoke; and we'd take the
+ // early exit above.
+ assert(UseIndex < CS.data_operands_size() &&
+ "Data operand use expected!");
bool IsOperandBundleUse = UseIndex >= CS.getNumArgOperands();
More information about the llvm-commits
mailing list