[llvm-commits] CVS: llvm/lib/CodeGen/PrologEpilogInserter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri May 2 13:46:24 PDT 2003
Changes in directory llvm/lib/CodeGen:
PrologEpilogInserter.cpp updated: 1.9 -> 1.10
---
Log message:
Fix a bug which occurred with empty basic blocks
---
Diffs of the changes:
Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.9 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.10
--- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.9 Thu Jan 16 12:06:43 2003
+++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Fri May 2 13:44:42 2003
@@ -160,7 +160,7 @@
const TargetInstrInfo &TII = Fn.getTarget().getInstrInfo();
for (MachineFunction::iterator FI = Fn.begin(), E = Fn.end(); FI != E; ++FI) {
// If last instruction is a return instruction, add an epilogue
- if (TII.isReturn(FI->back()->getOpcode())) {
+ if (!FI->empty() && TII.isReturn(FI->back()->getOpcode())) {
MBB = FI; I = MBB->end()-1;
for (unsigned i = 0, e = RegsToSave.size(); i != e; ++i) {
More information about the llvm-commits
mailing list