[llvm] 58cc5a4 - [OpenMPIRBuilder] Add a constructor to ReductionInfo to appease gcc5

Alex Zinenko via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 2 02:49:39 PDT 2021


Author: Alex Zinenko
Date: 2021-08-02T11:49:32+02:00
New Revision: 58cc5a4c9fe7580eeaa7dd856ca89aa73f3482c8

URL: https://github.com/llvm/llvm-project/commit/58cc5a4c9fe7580eeaa7dd856ca89aa73f3482c8
DIFF: https://github.com/llvm/llvm-project/commit/58cc5a4c9fe7580eeaa7dd856ca89aa73f3482c8.diff

LOG: [OpenMPIRBuilder] Add a constructor to ReductionInfo to appease gcc5

Otherwise, it produces wrong code for brace initializers.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
index a196b54af1e1d..ef4e387ec8edc 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+++ b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
@@ -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();


        


More information about the llvm-commits mailing list