Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split DWARFFormValue::getReference into four functions #98905

Merged
merged 2 commits into from
Jul 16, 2024

Commits on Jul 15, 2024

  1. Split DWARFFormValue::getReference into four functions

    The result of the function cannot be correctly interpreted without
    knowing the precise form type (a type signature needs to be looked up
    very differently from a supplementary debug info reference). The
    function sort of worked because the two reference types (unit-relative
    and section-relative) that can be handled uniformly are also the most
    common types of references, but this setup made it easy to write code
    which does not support other kinds of reference (and if one tried to
    support them, the result didn't look pretty --
    https://github.com/llvm/llvm-project/pull/97423/files#r1676217081).
    
    The split is based on the reference type classification from DWARFv5
    (Section 7.5.5 Classes and Forms), and it should enable uniform (if
    slightly more verbose) hadling. Note that this only affects users which
    want more control of how (or if) the references are resolved. Users
    which just want to access the referenced DIE can use the higher level
    API (DWARFDie::GetAttributeValueAsReferencedDie) which returns (or will
    return after llvm#97423 is merged) the correct die for all reference types
    (except for supplementary references, which we don't support right now).
    labath committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    511e82f View commit details
    Browse the repository at this point in the history
  2. reformat

    labath committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    5dd4b3f View commit details
    Browse the repository at this point in the history