forked from OSchip/llvm-project
Make the TargetMachine::getSubtarget that takes a Function argument
take a reference to match the getSubtargetImpl that takes a Function argument. llvm-svn: 229994
This commit is contained in:
parent
c4f5a5e863
commit
1947a9e2e2
|
@ -113,7 +113,7 @@ public:
|
|||
template<typename STC> const STC &getSubtarget() const {
|
||||
return *static_cast<const STC*>(getSubtargetImpl());
|
||||
}
|
||||
template <typename STC> const STC &getSubtarget(const Function *) const {
|
||||
template <typename STC> const STC &getSubtarget(const Function &) const {
|
||||
return *static_cast<const STC*>(getSubtargetImpl());
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
Triple TT(TM.getTargetTriple());
|
||||
if (!TT.isOSBinFormatMachO())
|
||||
return 0;
|
||||
const ARMSubtarget &STI = TM.getSubtarget<ARMSubtarget>(F);
|
||||
const ARMSubtarget &STI = TM.getSubtarget<ARMSubtarget>(*F);
|
||||
return STI.isThumb() ? ARM::DW_ISA_ARM_thumb : ARM::DW_ISA_ARM_arm;
|
||||
}
|
||||
|
||||
|
|
|
@ -1249,7 +1249,7 @@ void PPCDarwinAsmPrinter::EmitStartOfAsmFile(Module &M) {
|
|||
// FIXME: How should we merge darwin directives?
|
||||
unsigned Directive = PPC::DIR_NONE;
|
||||
for (const Function &F : M) {
|
||||
const PPCSubtarget &STI = TM.getSubtarget<PPCSubtarget>(&F);
|
||||
const PPCSubtarget &STI = TM.getSubtarget<PPCSubtarget>(F);
|
||||
unsigned FDir = STI.getDarwinDirective();
|
||||
Directive = Directive > FDir ? FDir : STI.getDarwinDirective();
|
||||
if (STI.hasMFOCRF() && Directive < PPC::DIR_970)
|
||||
|
|
Loading…
Reference in New Issue