[cfe-commits] r83978 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Devang Patel
dpatel at apple.com
Tue Oct 13 10:02:04 PDT 2009
Author: dpatel
Date: Tue Oct 13 12:02:04 2009
New Revision: 83978
URL: http://llvm.org/viewvc/llvm-project?rev=83978&view=rev
Log:
Do not check use_empty() before invoking replaceAllUsesWith().
Let replaceAllUsesWith() adjust VHs even though there are no uses.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=83978&r1=83977&r2=83978&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Oct 13 12:02:04 2009
@@ -1110,8 +1110,9 @@
NewCall->setCallingConv(CI->getCallingConv());
// Finally, remove the old call, replacing any uses with the new one.
- if (!CI->use_empty())
- CI->replaceAllUsesWith(NewCall);
+ CI->replaceAllUsesWith(NewCall);
+
+
CI->eraseFromParent();
}
}
More information about the cfe-commits
mailing list