summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMConstantPoolValue.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2009-09-01 01:57:56 +0000
committerJim Grosbach <grosbach@apple.com>2009-09-01 01:57:56 +0000
commit3fb2b1ede30193b59a651328a946174196b20610 (patch)
treea24c457792ad0101ac817f963c62327ebf1d6135 /lib/Target/ARM/ARMConstantPoolValue.h
parentf98d8fee3c5367622cf03e52f1e1b2251ac6cf3f (diff)
downloadllvm-3fb2b1ede30193b59a651328a946174196b20610.tar.gz
llvm-3fb2b1ede30193b59a651328a946174196b20610.tar.bz2
llvm-3fb2b1ede30193b59a651328a946174196b20610.tar.xz
Clean up LSDA name generation and use for SJLJ exception handling. This
makes an eggregious hack somewhat more palatable. Bringing the LSDA forward and making it a GV available for reference would be even better, but is beyond the scope of what I'm looking to solve at this point. Objective C++ code could generate function names that broke the previous scheme. This fixes that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMConstantPoolValue.h')
-rw-r--r--lib/Target/ARM/ARMConstantPoolValue.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMConstantPoolValue.h b/lib/Target/ARM/ARMConstantPoolValue.h
index 8a0348b797..525346dd41 100644
--- a/lib/Target/ARM/ARMConstantPoolValue.h
+++ b/lib/Target/ARM/ARMConstantPoolValue.h
@@ -21,12 +21,20 @@ namespace llvm {
class GlobalValue;
class LLVMContext;
+namespace ARMCP {
+ enum ARMCPKind {
+ CPValue,
+ CPLSDA
+ };
+}
+
/// ARMConstantPoolValue - ARM specific constantpool value. This is used to
/// represent PC relative displacement between the address of the load
/// instruction and the global value being loaded, i.e. (&GV-(LPIC+8)).
class ARMConstantPoolValue : public MachineConstantPoolValue {
GlobalValue *GV; // GlobalValue being loaded.
const char *S; // ExtSymbol being loaded.
+ ARMCP::ARMCPKind Kind; // Value or LSDA?
unsigned LabelId; // Label id of the load.
unsigned char PCAdjust; // Extra adjustment if constantpool is pc relative.
// 8 for ARM, 4 for Thumb.
@@ -35,6 +43,7 @@ class ARMConstantPoolValue : public MachineConstantPoolValue {
public:
ARMConstantPoolValue(GlobalValue *gv, unsigned id,
+ ARMCP::ARMCPKind Kind = ARMCP::CPValue,
unsigned char PCAdj = 0, const char *Modifier = NULL,
bool AddCurrentAddress = false);
ARMConstantPoolValue(LLVMContext &C, const char *s, unsigned id,
@@ -52,6 +61,7 @@ public:
bool mustAddCurrentAddress() const { return AddCurrentAddress; }
unsigned getLabelId() const { return LabelId; }
unsigned char getPCAdjustment() const { return PCAdjust; }
+ bool isLSDA() { return Kind == ARMCP::CPLSDA; }
virtual unsigned getRelocationInfo() const {
// FIXME: This is conservatively claiming that these entries require a