mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-09 05:57:23 +00:00
Make the TargetMachine::getSubtarget that takes a Function argument
take a reference to match the getSubtargetImpl that takes a Function argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229994 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a074de6ff4
commit
c9d0715997
@ -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…
x
Reference in New Issue
Block a user