forked from OSchip/llvm-project
Reimplement the temporary non-const getSubtargetImpl routine so
that we can avoid implementing it on every target. Thanks to Richard Smith for the suggestions! llvm-svn: 214780
This commit is contained in:
parent
5908ab4dd6
commit
acc8ef273b
llvm/include/llvm/Target
|
@ -100,7 +100,10 @@ public:
|
|||
virtual const TargetSubtargetInfo *getSubtargetImpl() const {
|
||||
return nullptr;
|
||||
}
|
||||
virtual TargetSubtargetInfo *getSubtargetImpl() { return nullptr; }
|
||||
virtual TargetSubtargetInfo *getSubtargetImpl() {
|
||||
const TargetMachine *TM = this;
|
||||
return const_cast<TargetSubtargetInfo *>(TM->getSubtargetImpl());
|
||||
}
|
||||
|
||||
mutable TargetOptions Options;
|
||||
|
||||
|
|
Loading…
Reference in New Issue