1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Avoid needlessly casting away const qualifiers.

llvm-svn: 46876
This commit is contained in:
Dan Gohman 2008-02-08 03:26:46 +00:00
parent b2bc19ee5b
commit 1f255f2db7
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;