Use const qualifiers with TargetLowering. This eliminates several

const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101635 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-04-17 15:26:15 +00:00
parent 1e93df6f0b
commit d858e90f03
70 changed files with 755 additions and 690 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ public:
return &InstrInfo.getRegisterInfo();
}
virtual SystemZTargetLowering *getTargetLowering() const {
return const_cast<SystemZTargetLowering*>(&TLInfo);
virtual const SystemZTargetLowering *getTargetLowering() const {
return &TLInfo;
}
virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);