summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-15 01:51:59 +0000
committerDan Gohman <gohman@apple.com>2010-04-15 01:51:59 +0000
commitbcaf681cdef13dcf4a863288c3329be96f96bd14 (patch)
tree74e33ebe55a3f42cbcab17b94b633920dc026367 /llvm/lib/Target/XCore
parent1bbc7086ff89a53b2c4e69e9d8bff959030cb5ed (diff)
downloadbcm5719-llvm-bcaf681cdef13dcf4a863288c3329be96f96bd14.tar.gz
bcm5719-llvm-bcaf681cdef13dcf4a863288c3329be96f96bd14.zip
Add const qualifiers to CodeGen's use of LLVM IR constructs.
llvm-svn: 101334
Diffstat (limited to 'llvm/lib/Target/XCore')
-rw-r--r--llvm/lib/Target/XCore/XCoreISelLowering.cpp8
-rw-r--r--llvm/lib/Target/XCore/XCoreISelLowering.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp
index 27e52332466..9cb22a04dde 100644
--- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp
+++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp
@@ -220,7 +220,7 @@ LowerSELECT_CC(SDValue Op, SelectionDAG &DAG)
}
SDValue XCoreTargetLowering::
-getGlobalAddressWrapper(SDValue GA, GlobalValue *GV, SelectionDAG &DAG)
+getGlobalAddressWrapper(SDValue GA, const GlobalValue *GV, SelectionDAG &DAG)
{
// FIXME there is no actual debug info here
DebugLoc dl = GA.getDebugLoc();
@@ -243,7 +243,7 @@ getGlobalAddressWrapper(SDValue GA, GlobalValue *GV, SelectionDAG &DAG)
SDValue XCoreTargetLowering::
LowerGlobalAddress(SDValue Op, SelectionDAG &DAG)
{
- GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
+ const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
SDValue GA = DAG.getTargetGlobalAddress(GV, MVT::i32);
// If it's a debug information descriptor, don't mess with it.
if (DAG.isVerifiedDebugInfoDesc(Op))
@@ -267,7 +267,7 @@ LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG)
// FIXME there isn't really debug info here
DebugLoc dl = Op.getDebugLoc();
// transform to label + getid() * size
- GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
+ const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
SDValue GA = DAG.getTargetGlobalAddress(GV, MVT::i32);
const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV);
if (!GVar) {
@@ -300,7 +300,7 @@ LowerBlockAddress(SDValue Op, SelectionDAG &DAG)
{
DebugLoc DL = Op.getDebugLoc();
- BlockAddress *BA = cast<BlockAddressSDNode>(Op)->getBlockAddress();
+ const BlockAddress *BA = cast<BlockAddressSDNode>(Op)->getBlockAddress();
SDValue Result = DAG.getBlockAddress(BA, getPointerTy(), /*isTarget=*/true);
return DAG.getNode(XCoreISD::PCRelativeWrapper, DL, getPointerTy(), Result);
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.h b/llvm/lib/Target/XCore/XCoreISelLowering.h
index 3ccdeec141b..cb83229d66a 100644
--- a/llvm/lib/Target/XCore/XCoreISelLowering.h
+++ b/llvm/lib/Target/XCore/XCoreISelLowering.h
@@ -129,7 +129,7 @@ namespace llvm {
DebugLoc dl, SelectionDAG &DAG,
SmallVectorImpl<SDValue> &InVals);
SDValue getReturnAddressFrameIndex(SelectionDAG &DAG);
- SDValue getGlobalAddressWrapper(SDValue GA, GlobalValue *GV,
+ SDValue getGlobalAddressWrapper(SDValue GA, const GlobalValue *GV,
SelectionDAG &DAG);
// Lower Operand specifics
OpenPOWER on IntegriCloud