aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-02-08 03:26:46 +0000
committerDan Gohman <gohman@apple.com>2008-02-08 03:26:46 +0000
commit547ca537b638c8fd5c8f4729e4c74898f8371e4e (patch)
tree8535cf893c1e3c468863cbcc6719e97d993dd1b2
parent33663fc104d0cdfc06cac55f677e9bc0bb5f5817 (diff)
Avoid needlessly casting away const qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46876 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h2
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 9cb58c9329..2c35e3181b 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1001,7 +1001,7 @@ protected:
/// getValueTypeList - Return a pointer to the specified value type.
///
- static MVT::ValueType *getValueTypeList(MVT::ValueType VT);
+ static const MVT::ValueType *getValueTypeList(MVT::ValueType VT);
static SDVTList getSDVTList(MVT::ValueType VT) {
SDVTList Ret = { getValueTypeList(VT), 1 };
return Ret;
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index b58138eb2b..a62ea53142 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -3563,10 +3563,10 @@ void SDNode::Profile(FoldingSetNodeID &ID) {
/// getValueTypeList - Return a pointer to the specified value type.
///
-MVT::ValueType *SDNode::getValueTypeList(MVT::ValueType VT) {
+const MVT::ValueType *SDNode::getValueTypeList(MVT::ValueType VT) {
if (MVT::isExtendedVT(VT)) {
static std::set<MVT::ValueType> EVTs;
- return (MVT::ValueType *)&(*EVTs.insert(VT).first);
+ return &(*EVTs.insert(VT).first);
} else {
static MVT::ValueType VTs[MVT::LAST_VALUETYPE];
VTs[VT] = VT;