Skip declarations.

llvm-svn: 47890
This commit is contained in:
Devang Patel 2008-03-04 17:47:06 +00:00
parent 5b69f3fa33
commit 6bb36e686d
1 changed files with 1 additions and 1 deletions

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.