Skip to content

Commit c046931

Browse files
ftynsekiranchandramohan
authored andcommitted
[OpenMPIRBuilder] Add a constructor to ReductionInfo to appease gcc5
Otherwise, it produces wrong code for brace initializers.
1 parent 7208d06 commit c046931

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,12 @@ class OpenMPIRBuilder {
500500

501501
/// Information about an OpenMP reduction.
502502
struct ReductionInfo {
503+
ReductionInfo(Value *Variable, Value *PrivateVariable,
504+
ReductionGenTy ReductionGen,
505+
AtomicReductionGenTy AtomicReductionGen)
506+
: Variable(Variable), PrivateVariable(PrivateVariable),
507+
ReductionGen(ReductionGen), AtomicReductionGen(AtomicReductionGen) {}
508+
503509
/// Returns the type of the element being reduced.
504510
Type *getElementType() const {
505511
return Variable->getType()->getPointerElementType();

0 commit comments

Comments
 (0)