Skip declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2008-03-04 17:47:06 +00:00
parent 74382c3453
commit d0f4103a31

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.