MC: Remove obsolete MachO UseAggressiveSymbolFolding.

Fix the FIXME and remove this old as(1) compat option. It was useful for
bringup of the integrated assembler to diff object files, but now it's
just causing more relocations than strictly necessary to be generated.

rdar://21201804

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239084 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2015-06-04 20:27:42 +00:00
parent 711ff5004a
commit aa48bf4e1c
9 changed files with 28 additions and 81 deletions

View File

@@ -11,12 +11,9 @@
using namespace llvm;
MCMachObjectTargetWriter::MCMachObjectTargetWriter(
bool Is64Bit_, uint32_t CPUType_, uint32_t CPUSubtype_,
bool UseAggressiveSymbolFolding_)
: Is64Bit(Is64Bit_), CPUType(CPUType_), CPUSubtype(CPUSubtype_),
UseAggressiveSymbolFolding(UseAggressiveSymbolFolding_) {
}
MCMachObjectTargetWriter::MCMachObjectTargetWriter(bool Is64Bit_,
uint32_t CPUType_,
uint32_t CPUSubtype_)
: Is64Bit(Is64Bit_), CPUType(CPUType_), CPUSubtype(CPUSubtype_) {}
MCMachObjectTargetWriter::~MCMachObjectTargetWriter() {
}
MCMachObjectTargetWriter::~MCMachObjectTargetWriter() {}

View File

@@ -703,9 +703,6 @@ bool MachObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(
SA.isTemporary() && SA.isInSection() && &SecA == &SecB){
return true;
}
} else {
if (!TargetObjectWriter->useAggressiveSymbolFolding())
return false;
}
// If they are not in the same section, we can't compute the diff.

View File

@@ -31,8 +31,7 @@ class AArch64MachObjectWriter : public MCMachObjectTargetWriter {
public:
AArch64MachObjectWriter(uint32_t CPUType, uint32_t CPUSubtype)
: MCMachObjectTargetWriter(true /* is64Bit */, CPUType, CPUSubtype,
/*UseAggressiveSymbolFolding=*/true) {}
: MCMachObjectTargetWriter(true /* is64Bit */, CPUType, CPUSubtype) {}
void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,
const MCAsmLayout &Layout, const MCFragment *Fragment,

View File

@@ -49,10 +49,8 @@ class ARMMachObjectWriter : public MCMachObjectTargetWriter {
const MCSymbol &S, uint64_t FixedValue);
public:
ARMMachObjectWriter(bool Is64Bit, uint32_t CPUType,
uint32_t CPUSubtype)
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype,
/*UseAggressiveSymbolFolding=*/true) {}
ARMMachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype) {}
void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,
const MCAsmLayout &Layout, const MCFragment *Fragment,

View File

@@ -38,8 +38,7 @@ class PPCMachObjectWriter : public MCMachObjectTargetWriter {
public:
PPCMachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype,
/*UseAggressiveSymbolFolding=*/Is64Bit) {}
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype) {}
void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,
const MCAsmLayout &Layout, const MCFragment *Fragment,

View File

@@ -54,10 +54,8 @@ class X86MachObjectWriter : public MCMachObjectTargetWriter {
MCValue Target, uint64_t &FixedValue);
public:
X86MachObjectWriter(bool Is64Bit, uint32_t CPUType,
uint32_t CPUSubtype)
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype,
/*UseAggressiveSymbolFolding=*/Is64Bit) {}
X86MachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype) {}
void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,
const MCAsmLayout &Layout, const MCFragment *Fragment,