Skip to content

Commit 8959996

Browse files
committed
[C++11] MSVC 2012 can't handle list-initialization that calls
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
1 parent 3dfabcb commit 8959996

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/llvm/IR/User.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ class User : public Value {
121121
inline op_iterator op_end() { return OperandList+NumOperands; }
122122
inline const_op_iterator op_end() const { return OperandList+NumOperands; }
123123
inline op_range operands() {
124-
return {op_begin(), op_end()};
124+
return op_range(op_begin(), op_end());
125125
}
126126
inline const_op_range operands() const {
127-
return {op_begin(), op_end()};
127+
return const_op_range(op_begin(), op_end());
128128
}
129129

130130
/// Convenience iterator for directly iterating over the Values in the
@@ -166,7 +166,7 @@ class User : public Value {
166166
return value_op_iterator(op_end());
167167
}
168168
inline iterator_range<value_op_iterator> operand_values() {
169-
return {value_op_begin(), value_op_end()};
169+
return iterator_range<value_op_iterator>(value_op_begin(), value_op_end());
170170
}
171171

172172
// dropAllReferences() - This function is in charge of "letting go" of all

0 commit comments

Comments
 (0)