diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-11-07 01:56:07 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-11-07 01:56:07 +0000 |
commit | ea1df7fe9fc363e7583f691431b54fdb658fe0a8 (patch) | |
tree | f8deff0a5561168b61373bceb9fcbc262761f77e /llvm/lib | |
parent | 54c3ca694a690a6b49ef2bd4ca4a300c1b205e63 (diff) | |
download | bcm5719-llvm-ea1df7fe9fc363e7583f691431b54fdb658fe0a8.tar.gz bcm5719-llvm-ea1df7fe9fc363e7583f691431b54fdb658fe0a8.zip |
[FunctionAttrs] Add comment and clarify assertion message; NFC
llvm-svn: 252389
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index b63ffb4a72c..907cede8e5c 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp @@ -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(); |