Commit 7eddf85
committed
[flang][debug] Improve check for global variable.
When a global variable is used in the OpenMP target region, it is
passed as an argument to the function that implements target region.
But the DeclareOp for this incarnation still have the original name of
the variable. As some of our checks to decide if a variable is global
or nor are based on the name, this can result in a local variable being
treated as global. This PR hardens the check a bit. We now also check
that memory ref is actually `an AddrOfOp` before looking at the name.1 parent c5cd1e9 commit 7eddf85
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments