[llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp
Chris Lattner
sabre at nondot.org
Tue Oct 3 13:19:37 PDT 2006
Changes in directory llvm/lib/CodeGen:
MachineFunction.cpp updated: 1.101 -> 1.102
---
Log message:
Bugfixes
---
Diffs of the changes: (+5 -7)
MachineFunction.cpp | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.101 llvm/lib/CodeGen/MachineFunction.cpp:1.102
--- llvm/lib/CodeGen/MachineFunction.cpp:1.101 Tue Oct 3 14:18:57 2006
+++ llvm/lib/CodeGen/MachineFunction.cpp Tue Oct 3 15:19:23 2006
@@ -25,9 +25,10 @@
#include "llvm/Target/TargetFrameInfo.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
-#include "llvm/Support/LeakDetector.h"
-#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/Compiler.h"
+#include "llvm/Support/GraphWriter.h"
+#include "llvm/Support/LeakDetector.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Config/config.h"
#include <fstream>
#include <iostream>
@@ -148,11 +149,8 @@
// Figure out the block number this should have.
unsigned BlockNo = 0;
- if (MBB != &front()) {
- MachineFunction::iterator I = MBB;
- --I;
- BlockNo = I->getNumber()+1;
- }
+ if (MBBI != begin())
+ BlockNo = prior(MBBI)->getNumber()+1;
for (; MBBI != E; ++MBBI, ++BlockNo) {
if (MBBI->getNumber() != (int)BlockNo) {
More information about the llvm-commits
mailing list