aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h42
-rw-r--r--include/llvm/Target/TargetMachine.h23
2 files changed, 25 insertions, 40 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index d3e5cf2119..a2f8c75647 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -25,6 +25,7 @@ namespace llvm {
class MCExpr;
class MCSection;
class MCSectionMachO;
+ class MCSymbol;
class MCContext;
class GlobalValue;
class TargetMachine;
@@ -175,23 +176,22 @@ public:
return 0;
}
- /// getSymbolForDwarfGlobalReference - Return an MCExpr to use for a
- /// pc-relative reference to the specified global variable from exception
- /// handling information. In addition to the symbol, this returns
- /// by-reference:
- ///
- /// IsIndirect - True if the returned symbol is actually a stub that contains
- /// the address of the symbol, false if the symbol is the global itself.
- ///
- /// IsPCRel - True if the symbol reference is already pc-relative, false if
- /// the caller needs to subtract off the address of the reference from the
- /// symbol.
+ /// getSymbolForDwarfGlobalReference - Return an MCExpr to use for a reference
+ /// to the specified global variable from exception handling information.
///
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
- MachineModuleInfo *MMI,
- bool &IsIndirect, bool &IsPCRel) const;
-
+ MachineModuleInfo *MMI, unsigned Encoding) const;
+
+ virtual const MCExpr *
+ getSymbolForDwarfReference(const MCSymbol *Sym, MachineModuleInfo *MMI,
+ unsigned Encoding) const;
+
+ virtual unsigned getPersonalityEncoding() const;
+ virtual unsigned getLSDAEncoding() const;
+ virtual unsigned getFDEEncoding() const;
+ virtual unsigned getTTypeEncoding() const;
+
protected:
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
@@ -231,7 +231,9 @@ public:
~TargetLoweringObjectFileELF();
virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
-
+
+ const MCSection *getDataRelSection() const { return DataRelSection; }
+
/// getSectionForConstant - Given a constant with the SectionKind, return a
/// section that it should be placed in.
virtual const MCSection *getSectionForConstant(SectionKind Kind) const;
@@ -244,6 +246,13 @@ public:
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler *Mang, const TargetMachine &TM) const;
+
+ /// getSymbolForDwarfGlobalReference - Return an MCExpr to use for a reference
+ /// to the specified global variable from exception handling information.
+ ///
+ virtual const MCExpr *
+ getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI, unsigned Encoding) const;
};
@@ -330,8 +339,7 @@ public:
/// defaults to returning a stub reference.
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
- MachineModuleInfo *MMI,
- bool &IsIndirect, bool &IsPCRel) const;
+ MachineModuleInfo *MMI, unsigned Encoding) const;
};
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index 63e28ac30a..c496e11926 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/include/llvm/Target/TargetMachine.h
@@ -68,15 +68,6 @@ namespace CodeGenOpt {
};
}
-// Specify if we should encode the LSDA pointer in the FDE as 4- or 8-bytes.
-namespace DwarfLSDAEncoding {
- enum Encoding {
- Default,
- FourByte,
- EightByte
- };
-}
-
//===----------------------------------------------------------------------===//
///
/// TargetMachine - Primary interface to the complete machine description for
@@ -179,20 +170,6 @@ public:
/// is false.
static void setAsmVerbosityDefault(bool);
- /// getLSDAEncoding - Returns the LSDA pointer encoding. The choices are
- /// 4-byte, 8-byte, and target default. The CIE is hard-coded to indicate that
- /// the LSDA pointer in the FDE section is an "sdata4", and should be encoded
- /// as a 4-byte pointer by default. However, some systems may require a
- /// different size due to bugs or other conditions. We will default to a
- /// 4-byte encoding unless the system tells us otherwise.
- ///
- /// FIXME: This call-back isn't good! We should be using the correct encoding
- /// regardless of the system. However, there are some systems which have bugs
- /// that prevent this from occuring.
- virtual DwarfLSDAEncoding::Encoding getLSDAEncoding() const {
- return DwarfLSDAEncoding::Default;
- }
-
/// CodeGenFileType - These enums are meant to be passed into
/// addPassesToEmitFile to indicate what type of file to emit, and returned by
/// it to indicate what type of file could actually be made.