diff options
author | Sid Nayyar <sidnayyar@google.com> | 2024-02-09 12:32:48 +0000 |
---|---|---|
committer | Giuliano Procida <gprocida@google.com> | 2024-02-09 12:54:52 +0000 |
commit | 4efae7c8d979fb4bf29648688dcc68d69f558fcd (patch) | |
tree | a5663d135e0ccfb2c83f35af33e6e39cec764284 | |
parent | 39f91d9020ca7c902903d4d328d57d23801959a2 (diff) | |
download | stg-4efae7c8d979fb4bf29648688dcc68d69f558fcd.tar.gz |
DWARF processor: Process member functions of enums
PiperOrigin-RevId: 605594047
Change-Id: I48a954a2fdeaaa347de54d4c9fbd3274854411e5
-rw-r--r-- | dwarf_processor.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dwarf_processor.cc b/dwarf_processor.cc index 4b1c7b5..395ffef 100644 --- a/dwarf_processor.cc +++ b/dwarf_processor.cc @@ -699,7 +699,11 @@ class Processor { break; } case DW_TAG_subprogram: - // TODO: Process enum member functions. + // STG does not support virtual methods for enums. + Check(child.MaybeGetUnsignedConstant(DW_AT_virtuality) + .value_or(DW_VIRTUALITY_none) == DW_VIRTUALITY_none) + << "Enums can not have virtual methods: " << EntryToString(child); + ProcessFunction(child); break; default: Die() << "Unexpected tag for child of enum: " << Hex(child_tag) |