Add method copyOperands().
authorVikram S. Adve <vadve@cs.uiuc.edu>
Thu, 22 Aug 2002 03:01:44 +0000 (03:01 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Thu, 22 Aug 2002 03:01:44 +0000 (03:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3445 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/User.h

index e78d21bbca0a1221f13d809e3e49f1db62468ce4..c2f0781aa6f62e709bb6ada76da9eaa1416ab751 100644 (file)
@@ -36,6 +36,10 @@ public:
   }
   inline unsigned getNumOperands() const { return Operands.size(); }
 
+  inline std::vector<Value*> copyOperands() const {
+    return std::vector<Value*>(op_begin(), op_end());
+  }
+
   // ---------------------------------------------------------------------------
   // Operand Iterator interface...
   //