[Lldb-commits] [PATCH] D26908: Improve detection of global vs local variables
Hafiz Abid Qadeer via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 21 05:28:33 PST 2016
abidh added subscribers: clayborg, abidh.
abidh added a comment.
Please add @clayborg as reviewer. Also paste the dwarf generated for this case from both gcc and clang.
================
Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3911
+ is_static_lifetime |= has_explicit_mangled;
+ is_static_lifetime |= (has_explicit_location && !location.IsValid());
// Check if the location has a DW_OP_addr with any address value...
----------------
Why not put the checks in the same line. Something like...
bool is_static_lifetime = has_explicit_mangled || (has_explicit_location && !location.IsValid());
You probably need logical operator and not the bitwise.
================
Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3925
}
+ is_static_lifetime |= location_DW_OP_addr != LLDB_INVALID_ADDRESS;
}
----------------
similar issue here
https://reviews.llvm.org/D26908
More information about the lldb-commits
mailing list