mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 17:42:40 +00:00
Fix bug: test/Regression/CBackend/2002-05-21-MissingReturn.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
94c75eccf1
commit
963b70bbf8
@ -567,8 +567,10 @@ void CWriter::printFunction(Function *F) {
|
||||
void CWriter::visitReturnInst(ReturnInst *I) {
|
||||
// Don't output a void return if this is the last basic block in the function
|
||||
if (I->getNumOperands() == 0 &&
|
||||
*(I->getParent()->getParent()->end()-1) == I->getParent())
|
||||
*(I->getParent()->getParent()->end()-1) == I->getParent() &&
|
||||
!I->getParent()->size() == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
Out << " return";
|
||||
if (I->getNumOperands()) {
|
||||
|
@ -567,8 +567,10 @@ void CWriter::printFunction(Function *F) {
|
||||
void CWriter::visitReturnInst(ReturnInst *I) {
|
||||
// Don't output a void return if this is the last basic block in the function
|
||||
if (I->getNumOperands() == 0 &&
|
||||
*(I->getParent()->getParent()->end()-1) == I->getParent())
|
||||
*(I->getParent()->getParent()->end()-1) == I->getParent() &&
|
||||
!I->getParent()->size() == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
Out << " return";
|
||||
if (I->getNumOperands()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user