Use the new ARMConstantPoolSymbol class to handle external symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140939 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2011-10-01 08:58:29 +00:00
parent ff4a8023ec
commit fe31e67350
6 changed files with 27 additions and 14 deletions

View File

@@ -41,7 +41,7 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C, unsigned id,
ARMCP::ARMCPModifier modifier,
bool addCurrentAddress)
: MachineConstantPoolValue((Type*)Type::getInt32Ty(C)),
LabelId(id), Kind(kind), PCAdjust(PCAdj), Modifier(modifier),
S(NULL), LabelId(id), Kind(kind), PCAdjust(PCAdj), Modifier(modifier),
AddCurrentAddress(addCurrentAddress) {}
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
@@ -231,7 +231,6 @@ int ARMConstantPoolConstant::getExistingMachineCPValue(MachineConstantPool *CP,
if (APC->getGV() == this->CVal &&
APC->getLabelId() == this->getLabelId() &&
APC->getPCAdjustment() == this->getPCAdjustment() &&
CPV_streq(APC->getSymbol(), this->getSymbol()) &&
APC->getModifier() == this->getModifier())
return i;
}
@@ -272,6 +271,12 @@ ARMConstantPoolSymbol::~ARMConstantPoolSymbol() {
free((void*)S);
}
ARMConstantPoolSymbol *
ARMConstantPoolSymbol::Create(LLVMContext &C, const char *s,
unsigned ID, unsigned char PCAdj) {
return new ARMConstantPoolSymbol(C, s, ID, PCAdj, ARMCP::no_modifier, false);
}
ARMConstantPoolSymbol *
ARMConstantPoolSymbol::Create(LLVMContext &C, const char *s,
unsigned ID, unsigned char PCAdj,