[C++11] MSVC 2012 can't handle list-initialization that calls
authorChandler Carruth <chandlerc@gmail.com>
Mon, 3 Mar 2014 10:59:41 +0000 (10:59 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 3 Mar 2014 10:59:41 +0000 (10:59 +0000)
a constructor either. Just call the constructor directly. I'll look into
making this work with aggregate initialization some other time (when
I have someone with MSVC 2012 handy to test ideas).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202688 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/User.h

index 7d3fb494adddf51f2bb9e3774e92b88cd56bbfd9..4f8d1b35df96faa2c33881492f196142e5e4bbc4 100644 (file)
@@ -121,10 +121,10 @@ public:
   inline op_iterator       op_end()         { return OperandList+NumOperands; }
   inline const_op_iterator op_end()   const { return OperandList+NumOperands; }
   inline op_range operands() {
-    return {op_begin(), op_end()};
+    return op_range(op_begin(), op_end());
   }
   inline const_op_range operands() const {
-    return {op_begin(), op_end()};
+    return const_op_range(op_begin(), op_end());
   }
 
   /// Convenience iterator for directly iterating over the Values in the
@@ -166,7 +166,7 @@ public:
     return value_op_iterator(op_end());
   }
   inline iterator_range<value_op_iterator> operand_values() {
-    return {value_op_begin(), value_op_end()};
+    return iterator_range<value_op_iterator>(value_op_begin(), value_op_end());
   }
 
   // dropAllReferences() - This function is in charge of "letting go" of all