Skip to content

Add DW_AT_pure attribute for pure functions #2901

@JohanEngelen

Description

@JohanEngelen

We can use Dwarf's pure function attribute to mark pure functions as such in debuggers.

See https://reviews.llvm.org/D54043

(for more context: https://lists.llvm.org/pipermail/llvm-dev/2018-November/127419.html)

  1. Elemental, Pure, and Recursive Procedures

DWARF 4 defines attributes for these Fortran procedure specifiers:
DW_AT_elemental, DW_AT_pure, DW_AT_recursive, resp. LLVM has a way of
informing the DWARF generator of simple boolean attributes in the metadata
via the flags parameter. We have added these new values to the existing
collection of flags.

!61 = !DISubprogram(…, flags: DIFlagPure)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions