mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +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:
@ -567,8 +567,10 @@ void CWriter::printFunction(Function *F) {
|
|||||||
void CWriter::visitReturnInst(ReturnInst *I) {
|
void CWriter::visitReturnInst(ReturnInst *I) {
|
||||||
// Don't output a void return if this is the last basic block in the function
|
// Don't output a void return if this is the last basic block in the function
|
||||||
if (I->getNumOperands() == 0 &&
|
if (I->getNumOperands() == 0 &&
|
||||||
*(I->getParent()->getParent()->end()-1) == I->getParent())
|
*(I->getParent()->getParent()->end()-1) == I->getParent() &&
|
||||||
|
!I->getParent()->size() == 1) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Out << " return";
|
Out << " return";
|
||||||
if (I->getNumOperands()) {
|
if (I->getNumOperands()) {
|
||||||
|
@ -567,8 +567,10 @@ void CWriter::printFunction(Function *F) {
|
|||||||
void CWriter::visitReturnInst(ReturnInst *I) {
|
void CWriter::visitReturnInst(ReturnInst *I) {
|
||||||
// Don't output a void return if this is the last basic block in the function
|
// Don't output a void return if this is the last basic block in the function
|
||||||
if (I->getNumOperands() == 0 &&
|
if (I->getNumOperands() == 0 &&
|
||||||
*(I->getParent()->getParent()->end()-1) == I->getParent())
|
*(I->getParent()->getParent()->end()-1) == I->getParent() &&
|
||||||
|
!I->getParent()->size() == 1) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Out << " return";
|
Out << " return";
|
||||||
if (I->getNumOperands()) {
|
if (I->getNumOperands()) {
|
||||||
|
Reference in New Issue
Block a user