commit | 6be9a1b0acfb99378d1b4027d13949b46a09392e | [log] [tgz] |
---|---|---|
author | Gabor Greif <ggreif@gmail.com> | Thu Jan 22 21:35:57 2009 +0000 |
committer | Gabor Greif <ggreif@gmail.com> | Thu Jan 22 21:35:57 2009 +0000 |
tree | 5da6a083d7eff2b5ba22d563b1a817caf42abcaf | |
parent | 3b2b6bde6ce92e6b8414ca8e89bd031485843ebd [diff] [blame] |
introduce a useful abstraction to find out if a Use is in the call position of an instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62788 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 69e427e..183e1a1 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -135,7 +135,7 @@ // Ensure that this call site is CALLING the function, not passing it as // an argument. - if (UI.getOperandNo() != 0) + if (!CS.isCallee(UI)) return false; }