LCOV - code coverage report
Current view: top level - src/dwarf/types - volatile.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_volatile_type`
       9              : pub struct Volatile<'a> {
      10              :     ptr: cxx::UniquePtr<ffi::DWARF_types_Volatile>,
      11              :     _owner: PhantomData<&'a ()>,
      12              : }
      13              : 
      14              : impl FromFFI<ffi::DWARF_types_Volatile> for Volatile<'_> {
      15            0 :     fn from_ffi(ptr: cxx::UniquePtr<ffi::DWARF_types_Volatile>) -> Self {
      16            0 :         Self {
      17            0 :             ptr,
      18            0 :             _owner: PhantomData,
      19            0 :         }
      20            0 :     }
      21              : }
      22              : 
      23              : impl DwarfType for Volatile<'_> {
      24            0 :     fn get_base(&self) -> &ffi::DWARF_Type {
      25            0 :         self.ptr.as_ref().unwrap().as_ref()
      26            0 :     }
      27              : }
      28              : 
      29              : impl Volatile<'_> {
      30              :     /// This underlying type
      31            0 :     pub fn underlying_type(&self) -> Option<Type> {
      32            0 :         into_optional(self.ptr.underlying_type())
      33            0 :     }
      34              : }
        

Generated by: LCOV version 2.1-1