Revert r201622 and r201608.

This causes the LLVMgold plugin to segfault. More information on the
replies to r201608.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201669 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Jasper
2014-02-19 12:26:01 +00:00
parent 1f55e40aa5
commit 9a92586114
31 changed files with 158 additions and 344 deletions

View File

@@ -71,8 +71,8 @@ public:
/// This hook allows targets to selectively decide not to emit the
/// UsedDirective for some symbols in llvm.used.
/// FIXME: REMOVE this (rdar://7071300)
virtual bool shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler &Mang,
TargetMachine &TM) const {
virtual bool shouldEmitUsedDirectiveFor(const GlobalValue *GV,
Mangler &Mang) const {
return GV != 0;
}
@@ -117,22 +117,25 @@ public:
/// Return an MCExpr to use for a reference to the specified global variable
/// from exception handling information.
virtual const MCExpr *
getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
Mangler &Mang, const TargetMachine &TM,
MachineModuleInfo *MMI, MCStreamer &Streamer) const;
virtual const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
unsigned Encoding,
Mangler &Mang,
MachineModuleInfo *MMI,
MCStreamer &Streamer) const;
/// Return the MCSymbol for the specified global value. This symbol is the
/// main label that is the address of the global
MCSymbol *getSymbol(const GlobalValue *GV, Mangler &M) const;
/// Return the MCSymbol for a private symbol with global value name as its
/// base, with the specified suffix.
MCSymbol *getSymbolWithGlobalValueBase(const GlobalValue *GV,
StringRef Suffix, Mangler &Mang,
const TargetMachine &TM) const;
StringRef Suffix, Mangler &M) const;
// The symbol that gets passed to .cfi_personality.
virtual MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
Mangler &Mang,
const TargetMachine &TM,
MachineModuleInfo *MMI) const;
virtual MCSymbol *
getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI) const;
const MCExpr *
getTTypeReference(const MCSymbolRefExpr *Sym, unsigned Encoding,
@@ -154,17 +157,10 @@ public:
virtual const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const;
virtual const MCExpr *
getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
const TargetMachine &TM) const {
getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang) const {
return 0;
}
/// \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,