[llvm-branch-commits] [cfe-branch] r73517 - in /cfe/branches/Apple/Dib: lib/CodeGen/CodeGenModule.cpp test/CodeGen/call-knr-indirect.c
Daniel Dunbar
daniel at zuster.org
Tue Jun 16 10:45:56 PDT 2009
Author: ddunbar
Date: Tue Jun 16 12:45:55 2009
New Revision: 73517
URL: http://llvm.org/viewvc/llvm-project?rev=73517&view=rev
Log:
Merge in 72869 and 73514 (<rdar://problem/6976555>):
------------------------------------------------------------------------
r72869 | lattner | 2009-06-04 09:47:43 -0700 (Thu, 04 Jun 2009) | 3 lines
Make ReplaceUsesOfNonProtoTypeWithRealFunction verify that a call is *to* the
function of interest, not an operand of it.
------------------------------------------------------------------------
------------------------------------------------------------------------
r73514 | lattner | 2009-06-16 10:39:02 -0700 (Tue, 16 Jun 2009) | 2 lines
testcase for r72869, it turns out that it happens in Ruby.
------------------------------------------------------------------------
Added:
cfe/branches/Apple/Dib/test/CodeGen/call-knr-indirect.c
- copied unchanged from r73514, cfe/trunk/test/CodeGen/call-knr-indirect.c
Modified:
cfe/branches/Apple/Dib/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/branches/Apple/Dib/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/CodeGen/CodeGenModule.cpp?rev=73517&r1=73516&r2=73517&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/branches/Apple/Dib/lib/CodeGen/CodeGenModule.cpp Tue Jun 16 12:45:55 2009
@@ -856,8 +856,9 @@
for (llvm::Value::use_iterator UI = OldFn->use_begin(), E = OldFn->use_end();
UI != E; ) {
// TODO: Do invokes ever occur in C code? If so, we should handle them too.
+ unsigned OpNo = UI.getOperandNo();
llvm::CallInst *CI = dyn_cast<llvm::CallInst>(*UI++);
- if (!CI) continue;
+ if (!CI || OpNo != 0) continue;
// If the return types don't match exactly, and if the call isn't dead, then
// we can't transform this call.
More information about the llvm-branch-commits
mailing list