LCOV - code coverage report
Current view: top level - src/dwarf/types - atomic.rs (source / functions) Coverage Total Hit
Test: lief.lcov Lines: 0.0 % 12 0
Test Date: 2024-11-30:00:00:00 Functions: 0.0 % 3 0

            Line data    Source code
       1              : use lief_ffi as ffi;
       2              : 
       3              : use crate::common::{into_optional, FromFFI};
       4              : use std::marker::PhantomData;
       5              : use crate::dwarf::types::DwarfType;
       6              : use crate::dwarf::Type;
       7              : 
       8              : /// This structure represents a `DW_TAG_atomic_type`
       9              : pub struct Atomic<'a> {
      10              :     ptr: cxx::UniquePtr<ffi::DWARF_types_Atomic>,
      11              :     _owner: PhantomData<&'a ()>,
      12              : }
      13              : 
      14              : impl FromFFI<ffi::DWARF_types_Atomic> for Atomic<'_> {
      15            0 :     fn from_ffi(ptr: cxx::UniquePtr<ffi::DWARF_types_Atomic>) -> Self {
      16            0 :         Self {
      17            0 :             ptr,
      18            0 :             _owner: PhantomData,
      19            0 :         }
      20            0 :     }
      21              : }
      22              : 
      23              : impl DwarfType for Atomic<'_> {
      24            0 :     fn get_base(&self) -> &ffi::DWARF_Type {
      25            0 :         self.ptr.as_ref().unwrap().as_ref()
      26            0 :     }
      27              : }
      28              : 
      29              : impl Atomic<'_> {
      30            0 :     pub fn underlying_type(&self) -> Option<Type> {
      31            0 :         into_optional(self.ptr.underlying_type())
      32            0 :     }
      33              : }
        

Generated by: LCOV version 2.1-1