diff options
author | Dan Gohman <gohman@apple.com> | 2008-02-25 21:39:34 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-02-25 21:39:34 +0000 |
commit | f6283fd27be06021fbe262341be56331bc67786c (patch) | |
tree | eb931f3cbb09f01556809d86f4e6c370470d60ad | |
parent | f8d8b2b53ae5206015ab6a13412b223187406ecf (diff) |
Make some static variables const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47566 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index ca9aa2bca8..f4a2bc0b96 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -6543,13 +6543,13 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){ bool isSigned = Node->getOpcode() == ISD::SINT_TO_FP; MVT::ValueType SrcVT = Node->getOperand(0).getValueType(); if (VT == MVT::ppcf128 && SrcVT != MVT::i64) { - static uint64_t zero = 0; + static const uint64_t zero = 0; if (isSigned) { Hi = LegalizeOp(DAG.getNode(ISD::SINT_TO_FP, MVT::f64, Node->getOperand(0))); Lo = DAG.getConstantFP(APFloat(APInt(64, 1, &zero)), MVT::f64); } else { - static uint64_t TwoE32[] = { 0x41f0000000000000LL, 0 }; + static const uint64_t TwoE32[] = { 0x41f0000000000000LL, 0 }; Hi = LegalizeOp(DAG.getNode(ISD::SINT_TO_FP, MVT::f64, Node->getOperand(0))); Lo = DAG.getConstantFP(APFloat(APInt(64, 1, &zero)), MVT::f64); @@ -6569,7 +6569,7 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){ } if (VT == MVT::ppcf128 && SrcVT == MVT::i64 && !isSigned) { // si64->ppcf128 done by libcall, below - static uint64_t TwoE64[] = { 0x43f0000000000000LL, 0 }; + static const uint64_t TwoE64[] = { 0x43f0000000000000LL, 0 }; ExpandOp(DAG.getNode(ISD::SINT_TO_FP, MVT::ppcf128, Node->getOperand(0)), Lo, Hi); Hi = DAG.getNode(ISD::BUILD_PAIR, VT, Lo, Hi); |