X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FTarget%2FTargetLoweringObjectFile.h;h=7cf23b5a38811a0b670f7476e5ca83bca59978e7;hb=00552e3875ee5f382db6c98286a241a7d0efe1b8;hp=2a17bd200f4dfb224b1bec904151f6492d4b3005;hpb=7521964d28c5ccb28431aed23334638138d9bd0a;p=oota-llvm.git diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h index 2a17bd200f4..7cf23b5a388 100644 --- a/include/llvm/Target/TargetLoweringObjectFile.h +++ b/include/llvm/Target/TargetLoweringObjectFile.h @@ -42,16 +42,15 @@ class TargetLoweringObjectFile : public MCObjectFileInfo { void operator=(const TargetLoweringObjectFile&) = delete; protected: - const DataLayout *DL; bool SupportIndirectSymViaGOTPCRel; bool SupportGOTPCRelWithOffset; public: MCContext &getContext() const { return *Ctx; } - TargetLoweringObjectFile() : MCObjectFileInfo(), Ctx(nullptr), DL(nullptr), - SupportIndirectSymViaGOTPCRel(false), - SupportGOTPCRelWithOffset(true) {} + TargetLoweringObjectFile() + : MCObjectFileInfo(), Ctx(nullptr), SupportIndirectSymViaGOTPCRel(false), + SupportGOTPCRelWithOffset(true) {} virtual ~TargetLoweringObjectFile(); @@ -60,16 +59,9 @@ public: /// implementations a chance to set up their default sections. virtual void Initialize(MCContext &ctx, const TargetMachine &TM); - virtual void emitPersonalityValue(MCStreamer &Streamer, - const TargetMachine &TM, + virtual void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym) const; - /// Extract the dependent library name from a linker option string. Returns - /// StringRef() if the option does not specify a library. - virtual StringRef getDepLibFromLinkerOpt(StringRef LinkerOption) const { - return StringRef(); - } - /// Emit the module flags that the platform cares about. virtual void emitModuleFlags(MCStreamer &Streamer, ArrayRef Flags, @@ -77,7 +69,8 @@ public: /// Given a constant with the SectionKind, return a section that it should be /// placed in. - virtual MCSection *getSectionForConstant(SectionKind Kind, + virtual MCSection *getSectionForConstant(const DataLayout &DL, + SectionKind Kind, const Constant *C) const; /// Classify the specified global variable into a set of target independent @@ -188,6 +181,9 @@ public: return nullptr; } + virtual void emitLinkerFlagsForGlobal(raw_ostream &OS, const GlobalValue *GV, + const Mangler &Mang) const {} + protected: virtual MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang,