[PATCH] D72797: [llvm-dwarfdump][Statistics] Distinguish functions/variables with same name across different CUs
Kristina Bessonova via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 08:22:02 PST 2020
krisb added a comment.
@djtodoro those two binaries with 99% of availability just have some variables w/o locations (mostly artificial 'this' parameters of member functions).
But this change reveals one more interesting case.
For code like this:
int foo() {
if (cond1) {
static const int a = 1;
...
}
if (cond2) {
static const int a = 1;
...
}
}
clang (unlike gcc) generates both `a` variables in the function scope, not in a corresponded `DW_TAG_lexical_block` (as gcc does).
I'm not sure clang is right here, cause `a` - despite it is static - isn't visible outside the `if`.
What do you think about this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72797/new/
https://reviews.llvm.org/D72797
More information about the llvm-commits
mailing list