summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2011-05-27 19:09:24 +0000
committerCharles Davis <cdavis@mines.edu>2011-05-27 19:09:24 +0000
commit7b06b7357aa5a7cbdd769edbf6edb10fa055ea09 (patch)
tree6f97f0fd1907ce053bd77c15f7365e120263e7b4 /include
parentd3444ff5322ee0f17d9424fb3f5556b0d538c746 (diff)
downloadllvm-7b06b7357aa5a7cbdd769edbf6edb10fa055ea09.tar.gz
llvm-7b06b7357aa5a7cbdd769edbf6edb10fa055ea09.tar.bz2
llvm-7b06b7357aa5a7cbdd769edbf6edb10fa055ea09.tar.xz
Add a parameter to the Win64 EH section getters to get a section with a
suffix (e.g. .xdata$myfunc). The suffix part isn't implemented yet, but I'll get to it in the next patch. Fix up all callers of the affected functions. Make them pass said suffix to the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/TargetLoweringObjectFileImpl.h18
-rw-r--r--include/llvm/MC/MCWin64EH.h2
-rw-r--r--include/llvm/Target/TargetAsmInfo.h8
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h4
4 files changed, 20 insertions, 12 deletions
diff --git a/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h b/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
index c61cf399f8..70a46759d7 100644
--- a/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
+++ b/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
@@ -58,8 +58,10 @@ public:
virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
virtual const MCSection *getEHFrameSection() const;
- virtual const MCSection *getWin64EHFuncTableSection() const { return NULL; }
- virtual const MCSection *getWin64EHTableSection() const { return NULL; }
+ virtual const MCSection *getWin64EHFuncTableSection(StringRef) const {
+ return NULL;
+ }
+ virtual const MCSection *getWin64EHTableSection(StringRef) const{return NULL;}
virtual void emitPersonalityValue(MCStreamer &Streamer,
const TargetMachine &TM,
@@ -135,8 +137,10 @@ public:
virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
virtual const MCSection *getEHFrameSection() const;
- virtual const MCSection *getWin64EHFuncTableSection() const { return NULL; }
- virtual const MCSection *getWin64EHTableSection() const { return NULL; }
+ virtual const MCSection *getWin64EHFuncTableSection(StringRef) const {
+ return NULL;
+ }
+ virtual const MCSection *getWin64EHTableSection(StringRef) const{return NULL;}
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
@@ -209,10 +213,12 @@ public:
virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
virtual const MCSection *getEHFrameSection() const;
- virtual const MCSection *getWin64EHFuncTableSection() const {
+ virtual const MCSection *getWin64EHFuncTableSection(StringRef) const {
return PDataSection;
}
- virtual const MCSection *getWin64EHTableSection() const {return XDataSection;}
+ virtual const MCSection *getWin64EHTableSection(StringRef) const {
+ return XDataSection;
+ }
virtual const MCSection *getDrectveSection() const { return DrectveSection; }
diff --git a/include/llvm/MC/MCWin64EH.h b/include/llvm/MC/MCWin64EH.h
index 5c0cfad7c3..eb4665a2e9 100644
--- a/include/llvm/MC/MCWin64EH.h
+++ b/include/llvm/MC/MCWin64EH.h
@@ -20,6 +20,7 @@
#include <vector>
namespace llvm {
+ class StringRef;
class MCStreamer;
class MCSymbol;
@@ -80,6 +81,7 @@ namespace llvm {
class MCWin64EHUnwindEmitter {
public:
+ static StringRef GetSectionSuffix(const MCSymbol *func);
//
// This emits the unwind info sections (.pdata and .xdata in PE/COFF).
//
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h
index cd93c2ba0e..c30409d9f9 100644
--- a/include/llvm/Target/TargetAsmInfo.h
+++ b/include/llvm/Target/TargetAsmInfo.h
@@ -63,12 +63,12 @@ public:
return TLOF->getDwarfFrameSection();
}
- const MCSection *getWin64EHFuncTableSection() const {
- return TLOF->getWin64EHFuncTableSection();
+ const MCSection *getWin64EHFuncTableSection(StringRef Suffix) const {
+ return TLOF->getWin64EHFuncTableSection(Suffix);
}
- const MCSection *getWin64EHTableSection() const {
- return TLOF->getWin64EHTableSection();
+ const MCSection *getWin64EHTableSection(StringRef Suffix) const {
+ return TLOF->getWin64EHTableSection(Suffix);
}
unsigned getFDEEncoding(bool CFI) const {
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 78d49a96a6..3991035ce0 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -155,8 +155,8 @@ public:
const MCSection *getTLSExtraDataSection() const {
return TLSExtraDataSection;
}
- virtual const MCSection *getWin64EHFuncTableSection() const = 0;
- virtual const MCSection *getWin64EHTableSection() const = 0;
+ virtual const MCSection *getWin64EHFuncTableSection(StringRef suffix)const=0;
+ virtual const MCSection *getWin64EHTableSection(StringRef suffix) const = 0;
/// shouldEmitUsedDirectiveFor - This hook allows targets to selectively
/// decide not to emit the UsedDirective for some symbols in llvm.used.