aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/DwarfException.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-14 01:41:15 +0000
committerChris Lattner <sabre@nondot.org>2010-03-14 01:41:15 +0000
commit1611273351d75b5cbe2a67485bb9831d5916fe26 (patch)
tree0fa59fecf1480ead468d8c2208a8a95ae2e2e875 /lib/CodeGen/AsmPrinter/DwarfException.h
parentbf2d4c034da3a0109175d1c48c2c898b496a18b9 (diff)
downloadexternal_llvm-1611273351d75b5cbe2a67485bb9831d5916fe26.zip
external_llvm-1611273351d75b5cbe2a67485bb9831d5916fe26.tar.gz
external_llvm-1611273351d75b5cbe2a67485bb9831d5916fe26.tar.bz2
change EH related stuff (other than EH_LABEL) to use MCSymbol
instead of label ID's. This cleans up and regularizes a bunch of code and makes way for future progress. Unfortunately, this pointed out to me that JITDwarfEmitter.cpp is largely copy and paste from DwarfException/MachineModuleInfo and other places. This is very sad and disturbing. :( One major change here is that TidyLandingPads moved from being called in DwarfException::BeginFunction to being called in DwarfException::EndFunction. There should not be any functionality change from doing this, but I'm not an EH expert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98459 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.h')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.h b/lib/CodeGen/AsmPrinter/DwarfException.h
index 274d1a4..4bc4a45 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.h
+++ b/lib/CodeGen/AsmPrinter/DwarfException.h
@@ -111,13 +111,6 @@ class DwarfException : public DwarfPrinter {
/// PadLT - Order landing pads lexicographically by type id.
static bool PadLT(const LandingPadInfo *L, const LandingPadInfo *R);
- struct KeyInfo {
- static inline unsigned getEmptyKey() { return -1U; }
- static inline unsigned getTombstoneKey() { return -2U; }
- static unsigned getHashValue(const unsigned &Key) { return Key; }
- static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; }
- };
-
/// PadRange - Structure holding a try-range and the associated landing pad.
struct PadRange {
// The index of the landing pad.
@@ -126,7 +119,7 @@ class DwarfException : public DwarfPrinter {
unsigned RangeIndex;
};
- typedef DenseMap<unsigned, PadRange, KeyInfo> RangeMapType;
+ typedef DenseMap<MCSymbol *, PadRange> RangeMapType;
/// ActionEntry - Structure describing an entry in the actions table.
struct ActionEntry {
@@ -138,11 +131,11 @@ class DwarfException : public DwarfPrinter {
/// CallSiteEntry - Structure describing an entry in the call-site table.
struct CallSiteEntry {
// The 'try-range' is BeginLabel .. EndLabel.
- unsigned BeginLabel; // zero indicates the start of the function.
- unsigned EndLabel; // zero indicates the end of the function.
+ MCSymbol *BeginLabel; // zero indicates the start of the function.
+ MCSymbol *EndLabel; // zero indicates the end of the function.
// The landing pad starts at PadLabel.
- unsigned PadLabel; // zero indicates that there is no landing pad.
+ MCSymbol *PadLabel; // zero indicates that there is no landing pad.
unsigned Action;
};