diff options
Diffstat (limited to 'contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h')
-rw-r--r-- | contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h b/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h index 72bae0a..80d4d8e 100644 --- a/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h +++ b/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h @@ -16,37 +16,35 @@ #define LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringRef.h" #include "llvm/IR/Module.h" #include "llvm/MC/MCObjectFileInfo.h" #include "llvm/MC/SectionKind.h" +#include <cstdint> namespace llvm { - class MachineModuleInfo; - class Mangler; - class MCContext; - class MCExpr; - class MCSection; - class MCSymbol; - class MCSymbolRefExpr; - class MCStreamer; - class MCValue; - class ConstantExpr; - class GlobalValue; - class TargetMachine; + +class GlobalValue; +class MachineModuleInfo; +class Mangler; +class MCContext; +class MCExpr; +class MCSection; +class MCSymbol; +class MCSymbolRefExpr; +class MCStreamer; +class MCValue; +class TargetMachine; class TargetLoweringObjectFile : public MCObjectFileInfo { - MCContext *Ctx; + MCContext *Ctx = nullptr; /// Name-mangler for global names. Mangler *Mang = nullptr; - TargetLoweringObjectFile( - const TargetLoweringObjectFile&) = delete; - void operator=(const TargetLoweringObjectFile&) = delete; - protected: - bool SupportIndirectSymViaGOTPCRel; - bool SupportGOTPCRelWithOffset; + bool SupportIndirectSymViaGOTPCRel = false; + bool SupportGOTPCRelWithOffset = true; /// This section contains the static constructor pointer list. MCSection *StaticCtorSection; @@ -55,15 +53,15 @@ protected: MCSection *StaticDtorSection; public: + TargetLoweringObjectFile() = default; + TargetLoweringObjectFile(const TargetLoweringObjectFile &) = delete; + TargetLoweringObjectFile & + operator=(const TargetLoweringObjectFile &) = delete; + virtual ~TargetLoweringObjectFile(); + MCContext &getContext() const { return *Ctx; } Mangler &getMangler() const { return *Mang; } - TargetLoweringObjectFile() - : MCObjectFileInfo(), Ctx(nullptr), Mang(nullptr), - SupportIndirectSymViaGOTPCRel(false), SupportGOTPCRelWithOffset(true) {} - - virtual ~TargetLoweringObjectFile(); - /// This method must be called before any actual lowering is done. This /// specifies the current context for codegen, and gives the lowering /// implementations a chance to set up their default sections. @@ -72,10 +70,9 @@ public: virtual void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym) const; - /// Emit the module flags that the platform cares about. - virtual void emitModuleFlags(MCStreamer &Streamer, - ArrayRef<Module::ModuleFlagEntry> Flags, - const TargetMachine &TM) const {} + /// Emit the module-level metadata that the platform cares about. + virtual void emitModuleMetadata(MCStreamer &Streamer, Module &M, + const TargetMachine &TM) const {} /// Given a constant with the SectionKind, return a section that it should be /// placed in. @@ -194,4 +191,4 @@ protected: } // end namespace llvm -#endif +#endif // LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H |