forked from OSchip/llvm-project
Delete dead code.
The compact unwind info is only used by code that knows it is supported. llvm-svn: 211412
This commit is contained in:
parent
332a5e526e
commit
df100c337c
|
@ -717,11 +717,10 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
class DarwinX86_32AsmBackend : public DarwinX86AsmBackend {
|
class DarwinX86_32AsmBackend : public DarwinX86AsmBackend {
|
||||||
bool SupportsCU;
|
|
||||||
public:
|
public:
|
||||||
DarwinX86_32AsmBackend(const Target &T, const MCRegisterInfo &MRI,
|
DarwinX86_32AsmBackend(const Target &T, const MCRegisterInfo &MRI,
|
||||||
StringRef CPU, bool SupportsCU)
|
StringRef CPU)
|
||||||
: DarwinX86AsmBackend(T, MRI, CPU, false), SupportsCU(SupportsCU) {}
|
: DarwinX86AsmBackend(T, MRI, CPU, false) {}
|
||||||
|
|
||||||
MCObjectWriter *createObjectWriter(raw_ostream &OS) const override {
|
MCObjectWriter *createObjectWriter(raw_ostream &OS) const override {
|
||||||
return createX86MachObjectWriter(OS, /*Is64Bit=*/false,
|
return createX86MachObjectWriter(OS, /*Is64Bit=*/false,
|
||||||
|
@ -732,20 +731,16 @@ public:
|
||||||
/// \brief Generate the compact unwind encoding for the CFI instructions.
|
/// \brief Generate the compact unwind encoding for the CFI instructions.
|
||||||
uint32_t generateCompactUnwindEncoding(
|
uint32_t generateCompactUnwindEncoding(
|
||||||
ArrayRef<MCCFIInstruction> Instrs) const override {
|
ArrayRef<MCCFIInstruction> Instrs) const override {
|
||||||
return SupportsCU ? generateCompactUnwindEncodingImpl(Instrs) : 0;
|
return generateCompactUnwindEncodingImpl(Instrs);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DarwinX86_64AsmBackend : public DarwinX86AsmBackend {
|
class DarwinX86_64AsmBackend : public DarwinX86AsmBackend {
|
||||||
bool SupportsCU;
|
|
||||||
const MachO::CPUSubTypeX86 Subtype;
|
const MachO::CPUSubTypeX86 Subtype;
|
||||||
public:
|
public:
|
||||||
DarwinX86_64AsmBackend(const Target &T, const MCRegisterInfo &MRI,
|
DarwinX86_64AsmBackend(const Target &T, const MCRegisterInfo &MRI,
|
||||||
StringRef CPU, bool SupportsCU,
|
StringRef CPU, MachO::CPUSubTypeX86 st)
|
||||||
MachO::CPUSubTypeX86 st)
|
: DarwinX86AsmBackend(T, MRI, CPU, true), Subtype(st) {}
|
||||||
: DarwinX86AsmBackend(T, MRI, CPU, true), SupportsCU(SupportsCU),
|
|
||||||
Subtype(st) {
|
|
||||||
}
|
|
||||||
|
|
||||||
MCObjectWriter *createObjectWriter(raw_ostream &OS) const override {
|
MCObjectWriter *createObjectWriter(raw_ostream &OS) const override {
|
||||||
return createX86MachObjectWriter(OS, /*Is64Bit=*/true,
|
return createX86MachObjectWriter(OS, /*Is64Bit=*/true,
|
||||||
|
@ -788,7 +783,7 @@ public:
|
||||||
/// \brief Generate the compact unwind encoding for the CFI instructions.
|
/// \brief Generate the compact unwind encoding for the CFI instructions.
|
||||||
uint32_t generateCompactUnwindEncoding(
|
uint32_t generateCompactUnwindEncoding(
|
||||||
ArrayRef<MCCFIInstruction> Instrs) const override {
|
ArrayRef<MCCFIInstruction> Instrs) const override {
|
||||||
return SupportsCU ? generateCompactUnwindEncodingImpl(Instrs) : 0;
|
return generateCompactUnwindEncodingImpl(Instrs);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -801,9 +796,7 @@ MCAsmBackend *llvm::createX86_32AsmBackend(const Target &T,
|
||||||
Triple TheTriple(TT);
|
Triple TheTriple(TT);
|
||||||
|
|
||||||
if (TheTriple.isOSBinFormatMachO())
|
if (TheTriple.isOSBinFormatMachO())
|
||||||
return new DarwinX86_32AsmBackend(T, MRI, CPU,
|
return new DarwinX86_32AsmBackend(T, MRI, CPU);
|
||||||
TheTriple.isMacOSX() &&
|
|
||||||
!TheTriple.isMacOSXVersionLT(10, 7));
|
|
||||||
|
|
||||||
if (TheTriple.isOSWindows() && !TheTriple.isOSBinFormatELF())
|
if (TheTriple.isOSWindows() && !TheTriple.isOSBinFormatELF())
|
||||||
return new WindowsX86AsmBackend(T, false, CPU);
|
return new WindowsX86AsmBackend(T, false, CPU);
|
||||||
|
@ -823,9 +816,7 @@ MCAsmBackend *llvm::createX86_64AsmBackend(const Target &T,
|
||||||
StringSwitch<MachO::CPUSubTypeX86>(TheTriple.getArchName())
|
StringSwitch<MachO::CPUSubTypeX86>(TheTriple.getArchName())
|
||||||
.Case("x86_64h", MachO::CPU_SUBTYPE_X86_64_H)
|
.Case("x86_64h", MachO::CPU_SUBTYPE_X86_64_H)
|
||||||
.Default(MachO::CPU_SUBTYPE_X86_64_ALL);
|
.Default(MachO::CPU_SUBTYPE_X86_64_ALL);
|
||||||
return new DarwinX86_64AsmBackend(T, MRI, CPU,
|
return new DarwinX86_64AsmBackend(T, MRI, CPU, CS);
|
||||||
TheTriple.isMacOSX() &&
|
|
||||||
!TheTriple.isMacOSXVersionLT(10, 7), CS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TheTriple.isOSWindows() && !TheTriple.isOSBinFormatELF())
|
if (TheTriple.isOSWindows() && !TheTriple.isOSBinFormatELF())
|
||||||
|
|
Loading…
Reference in New Issue