summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/4/clang/0001-Fix-compilation-w-gcc9.patch
blob: ea9342574087aa1c4dd0d43af6bdf453d2991eaa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From a2af0b02eba35d0670e3e442ff7c61b3e2304edd Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Mon, 30 Dec 2019 02:11:35 +0100
Subject: [PATCH] Fix compilation w/gcc9

Build broken with the following errors:

```
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6275:24: error: lambda parameter 'CGF' previously declared as a capture
clang> 6275 |       CodeGenFunction &CGF, PrePostActionTy &) {
clang> |       ~~~~~~~~~~~~~~~~~^~~
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6321:62: error: lambda parameter 'CGF' previously declared as a capture
clang> 6321 |   auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF,
clang> |                                             ~~~~~~~~~~~~~~~~~^~~
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6400:56: error: lambda parameter 'CGF' previously declared as a capture
clang> 6400 |   auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
clang> |                                       ~~~~~~~~~~~~~~~~~^~~
```
---
 lib/CodeGen/CGOpenMPRuntime.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp
index 4025217..40a73ef 100644
--- a/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -6271,7 +6271,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(
   // Generate the code for the opening of the data environment. Capture all the
   // arguments of the runtime call by reference because they are used in the
   // closing of the region.
-  auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction](
+  auto &&BeginThenGen = [&D, Device, &Info, &CodeGen, &NoPrivAction](
       CodeGenFunction &CGF, PrePostActionTy &) {
     // Fill up the arrays with all the mapped variables.
     MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
@@ -6318,7 +6318,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(
   };
 
   // Generate code for the closing of the data region.
-  auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF,
+  auto &&EndThenGen = [Device, &Info](CodeGenFunction &CGF,
                                             PrePostActionTy &) {
     assert(Info.isValid() && "Invalid data environment closing arguments.");
 
@@ -6397,7 +6397,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall(
          "Expecting either target enter, exit data, or update directives.");
 
   // Generate the code for the opening of the data environment.
-  auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
+  auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) {
     // Fill up the arrays with all the mapped variables.
     MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
     MappableExprsHandler::MapValuesArrayTy Pointers;
-- 
2.23.1