summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/TargetLoweringObjectFileImpl.h')
-rw-r--r--include/llvm/CodeGen/TargetLoweringObjectFileImpl.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h b/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
index 2f1379131cbdc..c856435f5ddca 100644
--- a/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
+++ b/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
@@ -15,7 +15,7 @@
#ifndef LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H
#define LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H
-#include "llvm/ADT/StringRef.h"
+#include "llvm/MC/MCExpr.h"
#include "llvm/MC/SectionKind.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
@@ -23,7 +23,6 @@ namespace llvm {
class MachineModuleInfo;
class Mangler;
class MCAsmInfo;
- class MCExpr;
class MCSection;
class MCSectionMachO;
class MCSymbol;
@@ -36,6 +35,10 @@ class TargetLoweringObjectFileELF : public TargetLoweringObjectFile {
bool UseInitArray;
mutable unsigned NextUniqueID = 0;
+protected:
+ MCSymbolRefExpr::VariantKind PLTRelativeVariantKind =
+ MCSymbolRefExpr::VK_None;
+
public:
TargetLoweringObjectFileELF() : UseInitArray(false) {}
@@ -47,7 +50,8 @@ public:
/// Given a constant with the SectionKind, return a section that it should be
/// placed in.
MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
- const Constant *C) const override;
+ const Constant *C,
+ unsigned &Align) const override;
MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler &Mang,
@@ -81,6 +85,10 @@ public:
const MCSymbol *KeySym) const override;
MCSection *getStaticDtorSection(unsigned Priority,
const MCSymbol *KeySym) const override;
+
+ const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
+ const GlobalValue *RHS, Mangler &Mang,
+ const TargetMachine &TM) const override;
};
@@ -104,7 +112,8 @@ public:
const TargetMachine &TM) const override;
MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
- const Constant *C) const override;
+ const Constant *C,
+ unsigned &Align) const override;
/// The mach-o version of this method defaults to returning a stub reference.
const MCExpr *
@@ -131,6 +140,8 @@ public:
class TargetLoweringObjectFileCOFF : public TargetLoweringObjectFile {
+ mutable unsigned NextUniqueID = 0;
+
public:
~TargetLoweringObjectFileCOFF() override {}