aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMConstantPoolValue.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-10-01 09:30:42 +0000
committerBill Wendling <isanbard@gmail.com>2011-10-01 09:30:42 +0000
commit3320f2a3bfd4daec23ba7ceb50525140cc6316da (patch)
treed5fcd8bed487b3dae083f47637cec036864054c0 /lib/Target/ARM/ARMConstantPoolValue.cpp
parent9c18f51daaf89b9c706aa0557bede2cbb0debb69 (diff)
downloadexternal_llvm-3320f2a3bfd4daec23ba7ceb50525140cc6316da.zip
external_llvm-3320f2a3bfd4daec23ba7ceb50525140cc6316da.tar.gz
external_llvm-3320f2a3bfd4daec23ba7ceb50525140cc6316da.tar.bz2
Use the ARMConstantPoolMBB class to handle the MBB values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMConstantPoolValue.cpp')
-rw-r--r--lib/Target/ARM/ARMConstantPoolValue.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/lib/Target/ARM/ARMConstantPoolValue.cpp b/lib/Target/ARM/ARMConstantPoolValue.cpp
index cdb7476..2c200bd 100644
--- a/lib/Target/ARM/ARMConstantPoolValue.cpp
+++ b/lib/Target/ARM/ARMConstantPoolValue.cpp
@@ -31,7 +31,7 @@ ARMConstantPoolValue::ARMConstantPoolValue(Type *Ty, unsigned id,
unsigned char PCAdj,
ARMCP::ARMCPModifier modifier,
bool addCurrentAddress)
- : MachineConstantPoolValue(Ty), MBB(NULL), LabelId(id), Kind(kind),
+ : MachineConstantPoolValue(Ty), LabelId(id), Kind(kind),
PCAdjust(PCAdj), Modifier(modifier),
AddCurrentAddress(addCurrentAddress) {}
@@ -44,23 +44,8 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C, unsigned id,
LabelId(id), Kind(kind), PCAdjust(PCAdj), Modifier(modifier),
AddCurrentAddress(addCurrentAddress) {}
-ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
- const MachineBasicBlock *mbb,
- unsigned id,
- ARMCP::ARMCPKind K,
- unsigned char PCAdj,
- ARMCP::ARMCPModifier Modif,
- bool AddCA)
- : MachineConstantPoolValue((Type*)Type::getInt8PtrTy(C)),
- MBB(mbb), LabelId(id), Kind(K), PCAdjust(PCAdj),
- Modifier(Modif), AddCurrentAddress(AddCA) {}
-
ARMConstantPoolValue::~ARMConstantPoolValue() {}
-const MachineBasicBlock *ARMConstantPoolValue::getMBB() const {
- return MBB;
-}
-
const char *ARMConstantPoolValue::getModifierText() const {
switch (Modifier) {
default: llvm_unreachable("Unknown modifier!");
@@ -120,8 +105,6 @@ void ARMConstantPoolValue::dump() const {
}
void ARMConstantPoolValue::print(raw_ostream &O) const {
- if (MBB)
- O << "";
if (Modifier) O << "(" << getModifierText() << ")";
if (PCAdjust != 0) {
O << "-(LPC" << LabelId << "+" << (unsigned)PCAdjust;
@@ -304,16 +287,17 @@ void ARMConstantPoolSymbol::print(raw_ostream &O) const {
// ARMConstantPoolMBB
//===----------------------------------------------------------------------===//
-ARMConstantPoolMBB::ARMConstantPoolMBB(LLVMContext &C, MachineBasicBlock *mbb,
+ARMConstantPoolMBB::ARMConstantPoolMBB(LLVMContext &C,
+ const MachineBasicBlock *mbb,
unsigned id, unsigned char PCAdj,
ARMCP::ARMCPModifier Modifier,
bool AddCurrentAddress)
- : ARMConstantPoolValue(C, mbb, id, ARMCP::CPMachineBasicBlock, PCAdj,
+ : ARMConstantPoolValue(C, id, ARMCP::CPMachineBasicBlock, PCAdj,
Modifier, AddCurrentAddress),
MBB(mbb) {}
ARMConstantPoolMBB *ARMConstantPoolMBB::Create(LLVMContext &C,
- MachineBasicBlock *mbb,
+ const MachineBasicBlock *mbb,
unsigned ID,
unsigned char PCAdj) {
return new ARMConstantPoolMBB(C, mbb, ID, PCAdj, ARMCP::no_modifier, false);