diff options
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 91b3766fa2..071d0e92cb 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -125,9 +125,8 @@ bool ArgPromotion::PromoteArguments(CallGraphNode *CGN) { // Ensure that this call site is CALLING the function, not passing it as // an argument. - for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end(); - AI != E; ++AI) - if (*AI == F) return false; // Passing the function address in! + if (UI.getOperandNo() != 0) + return false; } // Check to see which arguments are promotable. If an argument is not |