More coverity fixes

llvm-svn: 28266
This commit is contained in:
Chris Lattner 2006-05-12 21:14:20 +00:00
parent 22f95b74ba
commit b19ce6c810
2 changed files with 3 additions and 2 deletions

View File

@ -197,7 +197,6 @@ MachineInstr* X86RegisterInfo::foldMemoryOperand(MachineInstr* MI,
/// FIXME: This should obviously be autogenerated by tablegen when patterns
/// are available!
MachineBasicBlock& MBB = *MI->getParent();
if (i == 0) {
switch(MI->getOpcode()) {
case X86::XCHG8rr: return MakeMRInst(X86::XCHG8mr ,FrameIndex, MI);

View File

@ -40,7 +40,9 @@ public:
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
virtual TargetJITInfo *getJITInfo() { return &JITInfo; }
virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
virtual X86TargetLowering *getTargetLowering() { return &TLInfo; }
virtual X86TargetLowering *getTargetLowering() const {
return const_cast<X86TargetLowering*>(&TLInfo);
}
virtual const MRegisterInfo *getRegisterInfo() const {
return &InstrInfo.getRegisterInfo();
}