aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;