Index: lib/Target/ARM/ARMConstantPoolValue.h |
=================================================================== |
--- lib/Target/ARM/ARMConstantPoolValue.h (revision 78188) |
+++ lib/Target/ARM/ARMConstantPoolValue.h (working copy) |
@@ -25,7 +25,8 @@ |
enum ARMCPKind { |
CPValue, |
CPNonLazyPtr, |
- CPStub |
+ CPStub, |
+ CPJumpTable |
}; |
} |
@@ -35,6 +36,7 @@ |
class ARMConstantPoolValue : public MachineConstantPoolValue { |
GlobalValue *GV; // GlobalValue being loaded. |
const char *S; // ExtSymbol being loaded. |
+ unsigned JumpTableIndex; // Index of a jump table. |
unsigned LabelId; // Label id of the load. |
ARMCP::ARMCPKind Kind; // non_lazy_ptr or stub? |
unsigned char PCAdjust; // Extra adjustment if constantpool is pc relative. |
@@ -53,8 +55,8 @@ |
bool AddCurrentAddress = false); |
ARMConstantPoolValue(GlobalValue *GV, ARMCP::ARMCPKind Kind, |
const char *Modifier); |
+ ARMConstantPoolValue(unsigned jt); |
- |
GlobalValue *getGV() const { return GV; } |
const char *getSymbol() const { return S; } |
const char *getModifier() const { return Modifier; } |
@@ -63,6 +65,11 @@ |
unsigned getLabelId() const { return LabelId; } |
bool isNonLazyPointer() const { return Kind == ARMCP::CPNonLazyPtr; } |
bool isStub() const { return Kind == ARMCP::CPStub; } |
+ bool isValue() const { return Kind == ARMCP::CPValue; } |
+ bool isJumpTable() const { return Kind == ARMCP::CPJumpTable; } |
+ virtual unsigned *getJumpTableIndex() { |
+ return isJumpTable() ? &JumpTableIndex : 0; |
+ } |
unsigned char getPCAdjustment() const { return PCAdjust; } |
virtual unsigned getRelocationInfo() const { |