Skip declarations.

llvm-svn: 47890
This commit is contained in:
Devang Patel 2008-03-04 17:47:06 +00:00
parent e33efc5c23
commit aef77854f9

View File

@ -73,7 +73,7 @@ bool SRETPromotion::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
bool SRETPromotion::PromoteReturn(CallGraphNode *CGN) {
Function *F = CGN->getFunction();
if (!F)
if (!F || F->isDeclaration())
return false;
// Make sure that function returns struct.