mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
x86: getCalleeSavedRegs() would crash on 0 (so don't default to it)
The current logic assumes that MF is not 0. Assert that it isn't, and remove the default of 0 from the header. llvm-svn: 203934
This commit is contained in:
parent
91e062e33e
commit
31df9fa073
@ -237,6 +237,7 @@ X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
bool HasAVX = TM.getSubtarget<X86Subtarget>().hasAVX();
|
||||
bool HasAVX512 = TM.getSubtarget<X86Subtarget>().hasAVX512();
|
||||
|
||||
assert(MF && "MachineFunction required");
|
||||
switch (MF->getFunction()->getCallingConv()) {
|
||||
case CallingConv::GHC:
|
||||
case CallingConv::HiPE:
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
/// getCalleeSavedRegs - Return a null-terminated list of all of the
|
||||
/// callee-save registers on this target.
|
||||
const uint16_t *
|
||||
getCalleeSavedRegs(const MachineFunction* MF = 0) const override;
|
||||
getCalleeSavedRegs(const MachineFunction* MF) const override;
|
||||
const uint32_t *getCallPreservedMask(CallingConv::ID) const override;
|
||||
const uint32_t *getNoPreservedMask() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user