Print SlotIndexes when available for -print-machineinstrs.

llvm-svn: 159726
This commit is contained in:
Jakob Stoklund Olesen 2012-07-04 23:53:19 +00:00
parent bd6116e78c
commit 2d29683988

View File

@ -14,6 +14,7 @@
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/SlotIndexes.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Debug.h"
@ -42,7 +43,7 @@ struct MachineFunctionPrinterPass : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) {
OS << "# " << Banner << ":\n";
MF.print(OS);
MF.print(OS, getAnalysisIfAvailable<SlotIndexes>());
return false;
}
};