diff options
| author | Dan Gohman <gohman@apple.com> | 2010-04-15 01:51:59 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-04-15 01:51:59 +0000 |
| commit | 36c56d0353f1a9c4e878f509aff85a62e5087dd4 (patch) | |
| tree | 77f85024abba153c97d6af9aa800ad53b20c4fd2 /lib/Target/ARM/ARMConstantPoolValue.cpp | |
| parent | 8fa8772831dacecfa6102d7e799eb6eb1857629b (diff) | |
| download | external_llvm-36c56d0353f1a9c4e878f509aff85a62e5087dd4.zip external_llvm-36c56d0353f1a9c4e878f509aff85a62e5087dd4.tar.gz external_llvm-36c56d0353f1a9c4e878f509aff85a62e5087dd4.tar.bz2 | |
Add const qualifiers to CodeGen's use of LLVM IR constructs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMConstantPoolValue.cpp')
| -rw-r--r-- | lib/Target/ARM/ARMConstantPoolValue.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMConstantPoolValue.cpp b/lib/Target/ARM/ARMConstantPoolValue.cpp index 90dd0c7..f13ccc6 100644 --- a/lib/Target/ARM/ARMConstantPoolValue.cpp +++ b/lib/Target/ARM/ARMConstantPoolValue.cpp @@ -21,7 +21,7 @@ #include <cstdlib> using namespace llvm; -ARMConstantPoolValue::ARMConstantPoolValue(Constant *cval, unsigned id, +ARMConstantPoolValue::ARMConstantPoolValue(const Constant *cval, unsigned id, ARMCP::ARMCPKind K, unsigned char PCAdj, const char *Modif, @@ -39,16 +39,17 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C, CVal(NULL), S(strdup(s)), LabelId(id), Kind(ARMCP::CPExtSymbol), PCAdjust(PCAdj), Modifier(Modif), AddCurrentAddress(AddCA) {} -ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv, const char *Modif) +ARMConstantPoolValue::ARMConstantPoolValue(const GlobalValue *gv, + const char *Modif) : MachineConstantPoolValue((const Type*)Type::getInt32Ty(gv->getContext())), CVal(gv), S(NULL), LabelId(0), Kind(ARMCP::CPValue), PCAdjust(0), Modifier(Modif) {} -GlobalValue *ARMConstantPoolValue::getGV() const { +const GlobalValue *ARMConstantPoolValue::getGV() const { return dyn_cast_or_null<GlobalValue>(CVal); } -BlockAddress *ARMConstantPoolValue::getBlockAddress() const { +const BlockAddress *ARMConstantPoolValue::getBlockAddress() const { return dyn_cast_or_null<BlockAddress>(CVal); } |
