This is an archive of the discontinued LLVM Phabricator instance.

[lldb][DWARFASTParserClang] Add support for DW_TAG_LLVM_annotation
Needs ReviewPublic

Authored by Michael137 on Feb 16 2023, 5:28 AM.

Details

Summary

This patch adds support for parsing DW_TAG_LLVM_annotations for
abi_tag's. This allows us to recreate more accurate ASTs nodes for
constructors/destructors, where previously we relied on guessing the
correct name mangling to resolve a ctor/dtor call. If a ctor/dtor
had an abi_tag we would fail to resolve the symbol because the
"guessing algorithm" (see CollectCandidateCPlusPlusNames) doesn't
account for them.

This is necessary to support calling destructors/constructors
of numerous libcxx types, since they recently got abi-tagged.

Testing

  • Added API test

Diff Detail

Event Timeline

Michael137 created this revision.Feb 16 2023, 5:28 AM
Herald added a project: Restricted Project. · View Herald Transcript
  • Update test

Any chance we can make these work more like member functions (could the ctors include their mangled names, for instance)? Or is it the innate nature of ctors having the various C1/C2/etc versions?

Any chance we can make these work more like member functions (could the ctors include their mangled names, for instance)? Or is it the innate nature of ctors having the various C1/C2/etc versions?

Oh, sorry, this is more suitable on the LLVM side... I'll make the comment over there instead.

  • Fix test on Linux
  • Add -glldb flag to test
  • Add test case for C2 constructor
  • Update tests
  • Update tets
Michael137 published this revision for review.Feb 25 2023, 8:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2023, 8:33 AM