Skip to content

Commit

Permalink
[OpenMPIRBuilder] Add a constructor to ReductionInfo to appease gcc5
Browse files Browse the repository at this point in the history
Otherwise, it produces wrong code for brace initializers.
  • Loading branch information
ftynse committed Aug 2, 2021
1 parent 7ed0120 commit 58cc5a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,12 @@ class OpenMPIRBuilder {

/// Information about an OpenMP reduction.
struct ReductionInfo {
ReductionInfo(Value *Variable, Value *PrivateVariable,
ReductionGenTy ReductionGen,
AtomicReductionGenTy AtomicReductionGen)
: Variable(Variable), PrivateVariable(PrivateVariable),
ReductionGen(ReductionGen), AtomicReductionGen(AtomicReductionGen) {}

/// Returns the type of the element being reduced.
Type *getElementType() const {
return Variable->getType()->getPointerElementType();
Expand Down

0 comments on commit 58cc5a4

Please sign in to comment.