aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuliano Procida <gprocida@google.com>2024-02-09 16:16:44 +0000
committerGiuliano Procida <gprocida@google.com>2024-02-09 16:18:42 +0000
commit66a5e24ce20d5dd6b258b7d75e8201800be6933c (patch)
tree4a34ceb89e4ecce73f3992d2188e9a41ddcdeb41
parent4efae7c8d979fb4bf29648688dcc68d69f558fcd (diff)
downloadstg-66a5e24ce20d5dd6b258b7d75e8201800be6933c.tar.gz
DWARF processor: always pass short type name to type definition filter check
The name is currently only used for diagnostics and for checking for rare built-in types when the declaration file attribute is missing. Contrary to previous expectations, the rare built-in types can be in the `std` namespace. The check looks for `__` as a prefix to determine whether a type is built in. PiperOrigin-RevId: 605634489 Change-Id: I05579facc10fbb8bd01ab9a90ed6c6a0858c97b4
-rw-r--r--dwarf_processor.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/dwarf_processor.cc b/dwarf_processor.cc
index 395ffef..99278d8 100644
--- a/dwarf_processor.cc
+++ b/dwarf_processor.cc
@@ -436,7 +436,7 @@ class Processor {
const auto full_name = scope_ + type_name;
const Id referred_type_id = GetReferredTypeId(MaybeGetReferredType(entry));
const Id id = AddProcessedNode<Typedef>(entry, full_name, referred_type_id);
- if (!ShouldKeepDefinition(entry, full_name)) {
+ if (!ShouldKeepDefinition(entry, type_name)) {
// We always model (and keep) typedef definitions. But we should exclude
// filtered out types from being type roots.
return;
@@ -554,7 +554,7 @@ class Processor {
}
if (entry.GetFlag(DW_AT_declaration) ||
- !ShouldKeepDefinition(entry, full_name)) {
+ !ShouldKeepDefinition(entry, type_name)) {
// Declaration may have partial information about members or method.
// We only need to parse children for information that will be needed in
// complete definition, but don't need to store them in incomplete node.
@@ -710,7 +710,7 @@ class Processor {
<< ", " << EntryToString(child);
}
}
- if (!ShouldKeepDefinition(entry, full_name)) {
+ if (!ShouldKeepDefinition(entry, type_name)) {
AddProcessedNode<Enumeration>(entry, full_name);
return;
}