Revert r224935 "Refactor duplicated code. No intended functionality change."

This is affecting the behavior of some ObjC++ / AArch64 test cases on Darwin.
Reverting to get the bots green while I track down the source of the changed
behavior.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2015-01-06 23:04:36 +00:00
parent 6a72b20325
commit 84acf09f32
15 changed files with 104 additions and 74 deletions

View File

@@ -89,6 +89,8 @@ public:
ArrayRef<Module::ModuleFlagEntry> ModuleFlags,
Mangler &Mang, const TargetMachine &TM) const override;
bool isSectionAtomizableBySymbols(const MCSection &Section) const override;
const MCSection *
SelectSectionForGlobal(const GlobalValue *GV,
SectionKind Kind, Mangler &Mang,

View File

@@ -67,6 +67,14 @@ public:
return false;
}
/// isSectionAtomizable - Check whether the given section can be split into
/// atoms.
///
/// \see MCAssembler::isSymbolLinkerVisible().
virtual bool isSectionAtomizable(const MCSection &Section) const {
return true;
}
/// @name Target Fixup Interfaces
/// @{

View File

@@ -382,12 +382,6 @@ public:
return nullptr;
}
/// \brief True if the section is atomized using the symbols in it.
/// This is false if the section is not atomized at all (most ELF sections) or
/// if it is atomized based on its contents (MachO' __TEXT,__cstring for
/// example).
virtual bool isSectionAtomizableBySymbols(const MCSection &Section) const;
virtual const MCExpr *getExprForPersonalitySymbol(const MCSymbol *Sym,
unsigned Encoding,
MCStreamer &Streamer) const;

View File

@@ -19,9 +19,9 @@
namespace llvm {
class MCAsmInfoDarwin : public MCAsmInfo {
virtual void anchor();
public:
explicit MCAsmInfoDarwin();
bool isSectionAtomizableBySymbols(const MCSection &Section) const override;
};
}

View File

@@ -151,6 +151,12 @@ public:
return nullptr;
}
/// \brief True if the section is atomized using the symbols in it.
/// This is false if the section is not atomized at all (most ELF sections) or
/// if it is atomized based on its contents (MachO' __TEXT,__cstring for
/// example).
virtual bool isSectionAtomizableBySymbols(const MCSection &Section) const;
protected:
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,