We accept TargetMachine as a const reference.

llvm-svn: 9775
This commit is contained in:
Misha Brukman 2003-11-07 17:44:18 +00:00
parent bd4a8ed139
commit faa42d264f
1 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ class PeepholeOpts: public BasicBlockPass {
bool visit(MachineBasicBlock& mvec,
MachineBasicBlock::iterator BBI) const;
public:
PeepholeOpts(const TargetMachine &T): target(T) { }
PeepholeOpts(const TargetMachine &TM): target(TM) { }
bool runOnBasicBlock(BasicBlock &BB); // apply this pass to each BB
virtual const char *getPassName() const { return "Peephole Optimization"; }
};
@ -160,6 +160,6 @@ bool PeepholeOpts::runOnBasicBlock(BasicBlock &BB) {
// createPeepholeOptsPass - Public entrypoint for peephole optimization
// and this file as a whole...
//
FunctionPass* createPeepholeOptsPass(TargetMachine &T) {
return new PeepholeOpts(T);
FunctionPass* createPeepholeOptsPass(const TargetMachine &TM) {
return new PeepholeOpts(TM);
}