[llvm-commits] [llvm] r47890 - /llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
Devang Patel
dpatel at apple.com
Tue Mar 4 09:47:06 PST 2008
Author: dpatel
Date: Tue Mar 4 11:47:06 2008
New Revision: 47890
URL: http://llvm.org/viewvc/llvm-project?rev=47890&view=rev
Log:
Skip declarations.
Modified:
llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=47890&r1=47889&r2=47890&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Tue Mar 4 11:47:06 2008
@@ -73,7 +73,7 @@
bool SRETPromotion::PromoteReturn(CallGraphNode *CGN) {
Function *F = CGN->getFunction();
- if (!F)
+ if (!F || F->isDeclaration())
return false;
// Make sure that function returns struct.
More information about the llvm-commits
mailing list