add an API so target-independent codegen can determine if a constant
pool entry will require relocations against it. I implemented this
conservatively for ARM, someone who is knowledgable about it should
see if this can be improved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76678 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMConstantPoolValue.h b/lib/Target/ARM/ARMConstantPoolValue.h
index abf7339..a930889 100644
--- a/lib/Target/ARM/ARMConstantPoolValue.h
+++ b/lib/Target/ARM/ARMConstantPoolValue.h
@@ -65,6 +65,13 @@
bool isStub() const { return Kind == ARMCP::CPStub; }
unsigned char getPCAdjustment() const { return PCAdjust; }
+ virtual unsigned getRelocatationInfo() const {
+ // FIXME: This is conservatively claiming that these entries require a
+ // relocation, we may be able to do better than this.
+ return 2;
+ }
+
+
virtual int getExistingMachineCPValue(MachineConstantPool *CP,
unsigned Alignment);