pstore2
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
pstore::repo::definition Struct Reference

Represents an individual symbol in a compilation. More...

#include <compilation.hpp>

Collaboration diagram for pstore::repo::definition:
Collaboration graph
[legend]

Public Member Functions

 definition (index::digest d, extent< fragment > x, typed_address< indirect_string > n, linkage l, visibility v=repo::visibility::default_vis) noexcept
 
auto linkage () const noexcept -> enum linkage
 
auto visibility () const noexcept -> enum visibility
 

Static Public Member Functions

static auto load (database const &db, typed_address< definition > addr) -> std::shared_ptr< definition const >
 Returns a pointer to an in-store definition instance. More...
 

Public Attributes

index::digest digest
 The digest of the fragment referenced by this compilation symbol.
 
extent< fragmentfext
 The extent of the fragment referenced by this compilation symbol.
 
typed_address< indirect_stringname
 
union {
   std::uint8_t   bf = UINT8_C (0)
 
   bit_field< std::uint8_t, 0, 4 >   linkage_
 
   bit_field< std::uint8_t, 4, 2 >   visibility_
 
}; 
 
std::uint8_t padding1 = 0
 
std::uint16_t padding2 = 0
 
std::uint32_t padding3 = 0
 

Friends

class compilation
 

Detailed Description

Represents an individual symbol in a compilation.

A definition provides the connection between a symbol name, its linkage, and the fragment which holds the associated data.

Constructor & Destructor Documentation

◆ definition()

definition::definition ( index::digest  d,
extent< fragment x,
typed_address< indirect_string n,
linkage  l,
visibility  v = repo::visibility::default_vis 
)
noexcept
Parameters
dThe fragment digest for this compilation symbol.
xThe fragment extent for this compilation symbol.
nSymbol name address.
lThe symbol linkage.
vThe symbol visibility.

Member Function Documentation

◆ load()

auto pstore::repo::definition::load ( database const &  db,
typed_address< definition addr 
) -> std::shared_ptr<definition const>
inlinestatic

Returns a pointer to an in-store definition instance.

Parameters
dbThe database from which the definition should be loaded.
addrAddress of the definition.
Returns
A pointer to the in-store definition.

The documentation for this struct was generated from the following files: