You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like we generate DWARF for range-for variables, so this is
specific to CodeView. (You probably knew that, but I needed to check.)
Here's my teeny test case. If CodeView does the right thing with this,
and it takes a more complicated case to trigger the problem, it'll be
worth knowing whether we get it right for DWARF as well.
#include
int foo(std::vector v) {
int i = 0;
for (auto w : v) ++i;
return i;
}
I see a variable entry for 'w', with a stack location and the right type.
Oddly it's wrapped inside two lexical blocks, which seems excessive; I'd
have expected one.
Extended Description
I encountered in yaml2coff.cpp. In the function layoutCOFF, there is a loop that begins like this.
// Assign each section data address consecutively.
for (COFFYAML::Section &S : CP.Obj.Sections) {
If you put a breakpoint in this loop and hover over S, or add a watch for it, it displays as "Variable is optimized away and not available."
This is at O0, so we really need this.
I haven't tried to make a minimal repro yet, but hopefully it's straightforward to do. This should be easy enough for anyone to repro though.
The text was updated successfully, but these errors were encountered: