summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetLoweringObjectFile.h
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2010-02-15 22:35:59 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2010-02-15 22:35:59 +0000
commit9184b25fa543a900463215c11635c2c014ddb623 (patch)
tree9b3be1493724888c938ca7e3962cf68448cc592b /include/llvm/Target/TargetLoweringObjectFile.h
parent6a7cb63f6fe4b9ce707e88490e2eeb76cb40ed80 (diff)
downloadllvm-9184b25fa543a900463215c11635c2c014ddb623.tar.gz
llvm-9184b25fa543a900463215c11635c2c014ddb623.tar.bz2
llvm-9184b25fa543a900463215c11635c2c014ddb623.tar.xz
Preliminary patch to improve dwarf EH generation - Hooks to return Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLoweringObjectFile.h')
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h42
1 files changed, 25 insertions, 17 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;
};