const-ify SelectionDAG::getNodeValueTypes.
authorDan Gohman <gohman@apple.com>
Wed, 9 Jul 2008 00:00:42 +0000 (00:00 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 9 Jul 2008 00:00:42 +0000 (00:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53264 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index a2da43f83ed5ee39f082e3c7ad30c0655dce9593..c370c246e3cec1ab2fb8413bb678cb13bc447d16 100644 (file)
@@ -167,7 +167,7 @@ public:
   const MVT *getNodeValueTypes(MVT VT1, MVT VT2, MVT VT3) {
     return getVTList(VT1, VT2, VT3).VTs;
   }
-  const MVT *getNodeValueTypes(std::vector<MVT> &vtList) {
+  const MVT *getNodeValueTypes(const std::vector<MVT> &vtList) {
     return getVTList(&vtList[0], (unsigned)vtList.size()).VTs;
   }
   
@@ -312,7 +312,7 @@ public:
                     const SDOperand *Ops, unsigned NumOps);
   SDOperand getNode(unsigned Opcode, MVT VT,
                     const SDUse *Ops, unsigned NumOps);
-  SDOperand getNode(unsigned Opcode, std::vector<MVT> &ResultTys,
+  SDOperand getNode(unsigned Opcode, const std::vector<MVT> &ResultTys,
                     const SDOperand *Ops, unsigned NumOps);
   SDOperand getNode(unsigned Opcode, const MVT *VTs, unsigned NumVTs,
                     const SDOperand *Ops, unsigned NumOps);
@@ -511,7 +511,7 @@ public:
                         const SDOperand *Ops, unsigned NumOps);
   SDNode *getTargetNode(unsigned Opcode, MVT VT1, MVT VT2, MVT VT3, MVT VT4,
                         const SDOperand *Ops, unsigned NumOps);
-  SDNode *getTargetNode(unsigned Opcode, std::vector<MVT> &ResultTys,
+  SDNode *getTargetNode(unsigned Opcode, const std::vector<MVT> &ResultTys,
                         const SDOperand *Ops, unsigned NumOps);
 
   /// getNodeIfExists - Get the specified node if it's already available, or
index e01e512e6baf6f2ff35b0ff0e156d60a6564e44b..a82f6dee95251ac92dfb7f9f2c4d79a7a3d7af15 100644 (file)
@@ -3399,7 +3399,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT VT,
 }
 
 SDOperand SelectionDAG::getNode(unsigned Opcode,
-                                std::vector<MVT> &ResultTys,
+                                const std::vector<MVT> &ResultTys,
                                 const SDOperand *Ops, unsigned NumOps) {
   return getNode(Opcode, getNodeValueTypes(ResultTys), ResultTys.size(),
                  Ops, NumOps);
@@ -3969,7 +3969,7 @@ SDNode *SelectionDAG::getTargetNode(unsigned Opcode, MVT VT1,
   return getNode(ISD::BUILTIN_OP_END+Opcode, VTs, 4, Ops, NumOps).Val;
 }
 SDNode *SelectionDAG::getTargetNode(unsigned Opcode,
-                                    std::vector<MVT> &ResultTys,
+                                    const std::vector<MVT> &ResultTys,
                                     const SDOperand *Ops, unsigned NumOps) {
   const MVT *VTs = getNodeValueTypes(ResultTys);
   return getNode(ISD::BUILTIN_OP_END+Opcode, VTs, ResultTys.size(),