CBMC
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
source_locationt Class Reference

#include <source_location.h>

+ Inheritance diagram for source_locationt:
+ Collaboration diagram for source_locationt:

Public Member Functions

 
std::string  as_string () const
 
std::string  as_string_with_cwd () const
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
void  set_property_class (const irep_idt &property_class)
 
 
 
 
 
 
 
 
 
  Set all unset source-location fields in this object to their values in 'from'.
 
std::optional< std::string >  full_path () const
  Get a path to the file, including working directory.
 
 
 
- Public Member Functions inherited from irept
 
 
 
 
  irept ()=default
 
 
const std::string &  id_string () const
 
void  id (const irep_idt &_data)
 
 
ireptadd (const irep_idt &name)
 
ireptadd (const irep_idt &name, irept irep)
 
const std::string &  get_string (const irep_idt &name) const
 
 
 
 
std::size_t  get_size_t (const irep_idt &name) const
 
 
void  set (const irep_idt &name, const irep_idt &value)
 
void  set (const irep_idt &name, irept irep)
 
void  set (const irep_idt &name, const long long value)
 
void  set_size_t (const irep_idt &name, const std::size_t value)
 
 
 
 
 
 
void  swap (irept &irep)
 
  defines ordering on the internal representation
 
  defines ordering on the internal representation
 
  defines ordering on the internal representation comments are ignored
 
void  clear ()
 
 
subtget_sub ()
 
 
 
 
std::size_t  hash () const
 
std::size_t  full_hash () const
 
 
std::string  pretty (unsigned indent=0, unsigned max_indent=0) const
 
- Public Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 
 
 
 
 
 
 
 
const dtread () const
 
dtwrite ()
 

Static Public Member Functions

static bool  is_built_in (const std::string &s)
 
 
- Static Public Member Functions inherited from irept
 
  count the number of named_sub elements that are not comments
 

Protected Member Functions

std::string  as_string (bool print_cwd) const
 
- Protected Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
void  detach ()
 

Additional Inherited Members

- Public Types inherited from irept
 
 
 
 
  Used to refer to this class from derived classes.
 
- Static Protected Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 
  Does the same as remove_ref, but using an explicit stack instead of recursion.
 
dtdata
 
- Static Protected Attributes inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 

Detailed Description

Definition at line 19 of file source_location.h.

Constructor & Destructor Documentation

◆  source_locationt()

source_locationt::source_locationt ( )
inline

Definition at line 22 of file source_location.h.

Member Function Documentation

◆  add_pragma()

void source_locationt::add_pragma ( const irep_idtpragma )
inline

Definition at line 213 of file source_location.h.

◆  as_string() [1/2]

std::string source_locationt::as_string ( ) const
inline

Definition at line 26 of file source_location.h.

◆  as_string() [2/2]

std::string source_locationt::as_string ( bool  print_cwd ) const
protected
parameters: print_cwd, print the absolute path to the file

Definition at line 24 of file source_location.cpp.

◆  as_string_with_cwd()

std::string source_locationt::as_string_with_cwd ( ) const
inline

Definition at line 31 of file source_location.h.

◆  clear_function()

void source_locationt::clear_function ( )
inline

Definition at line 141 of file source_location.h.

◆  full_path()

std::optional< std::string > source_locationt::full_path ( ) const

Get a path to the file, including working directory.

Returns
Full path unless the file name is empty or refers to a built-in, in which case {} is returned.

Definition at line 88 of file source_location.cpp.

◆  get_basic_block_source_lines()

const irept & source_locationt::get_basic_block_source_lines ( ) const
inline

Definition at line 94 of file source_location.h.

◆  get_case_number()

const irep_idt & source_locationt::get_case_number ( ) const
inline

Definition at line 84 of file source_location.h.

◆  get_column()

const irep_idt & source_locationt::get_column ( ) const
inline

Definition at line 51 of file source_location.h.

◆  get_comment()

const irep_idt & source_locationt::get_comment ( ) const
inline

Definition at line 79 of file source_location.h.

◆  get_file()

const irep_idt & source_locationt::get_file ( ) const
inline

Definition at line 36 of file source_location.h.

◆  get_function()

const irep_idt & source_locationt::get_function ( ) const
inline
Deprecated:
"deprecated since " "2022" "-" "10" "-" "13" "; " "use identifier of containing function"

Definition at line 64 of file source_location.h.

◆  get_hide()

bool source_locationt::get_hide ( ) const
inline

Definition at line 190 of file source_location.h.

◆  get_java_bytecode_index()

const irep_idt & source_locationt::get_java_bytecode_index ( ) const
inline

Definition at line 89 of file source_location.h.

◆  get_line()

const irep_idt & source_locationt::get_line ( ) const
inline

Definition at line 46 of file source_location.h.

◆  get_pragmas()

const irept::named_subt & source_locationt::get_pragmas ( ) const
inline

Definition at line 218 of file source_location.h.

◆  get_property_class()

const irep_idt & source_locationt::get_property_class ( ) const
inline

Definition at line 74 of file source_location.h.

◆  get_property_id()

const irep_idt & source_locationt::get_property_id ( ) const
inline

Definition at line 69 of file source_location.h.

◆  get_working_directory()

const irep_idt & source_locationt::get_working_directory ( ) const
inline

Definition at line 41 of file source_location.h.

◆  is_built_in() [1/2]

bool source_locationt::is_built_in ( ) const
inline

Definition at line 197 of file source_location.h.

◆  is_built_in() [2/2]

bool source_locationt::is_built_in ( const std::string &  s )
static

Definition at line 16 of file source_location.cpp.

◆  merge()

void source_locationt::merge ( const source_locationtfrom )

Set all unset source-location fields in this object to their values in 'from'.

Leave set fields in this object alone.

Definition at line 76 of file source_location.cpp.

◆  nil()

static const source_locationt & source_locationt::nil ( )
inlinestatic

Definition at line 206 of file source_location.h.

◆  property_fatal() [1/2]

bool source_locationt::property_fatal ( ) const
inline

Definition at line 99 of file source_location.h.

◆  property_fatal() [2/2]

void source_locationt::property_fatal ( bool  _property_fatal )
inline

Definition at line 177 of file source_location.h.

◆  set_basic_block_source_lines()

void source_locationt::set_basic_block_source_lines ( irept  source_lines )
inline

Definition at line 172 of file source_location.h.

◆  set_case_number()

void source_locationt::set_case_number ( const irep_idtnumber )
inline

Definition at line 162 of file source_location.h.

◆  set_column() [1/2]

void source_locationt::set_column ( const irep_idtcolumn )
inline

Definition at line 124 of file source_location.h.

◆  set_column() [2/2]

void source_locationt::set_column ( unsigned  column )
inline

Definition at line 129 of file source_location.h.

◆  set_comment()

void source_locationt::set_comment ( const irep_idtcomment )
inline

Definition at line 156 of file source_location.h.

◆  set_file()

void source_locationt::set_file ( const irep_idtfile )
inline

Definition at line 104 of file source_location.h.

◆  set_function()

void source_locationt::set_function ( const irep_idtfunction )
inline
Deprecated:
"deprecated since " "2022" "-" "10" "-" "13" "; " "use identifier of containing function"

Definition at line 135 of file source_location.h.

◆  set_hide()

void source_locationt::set_hide ( )
inline

Definition at line 185 of file source_location.h.

◆  set_java_bytecode_index()

void source_locationt::set_java_bytecode_index ( const irep_idtindex )
inline

Definition at line 167 of file source_location.h.

◆  set_line() [1/2]

void source_locationt::set_line ( const irep_idtline )
inline

Definition at line 114 of file source_location.h.

◆  set_line() [2/2]

void source_locationt::set_line ( unsigned  line )
inline

Definition at line 119 of file source_location.h.

◆  set_property_class()

void source_locationt::set_property_class ( const irep_idtproperty_class )
inline

Definition at line 151 of file source_location.h.

◆  set_property_id()

void source_locationt::set_property_id ( const irep_idtproperty_id )
inline

Definition at line 146 of file source_location.h.

◆  set_working_directory()

void source_locationt::set_working_directory ( const irep_idtcwd )
inline

Definition at line 109 of file source_location.h.


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

AltStyle によって変換されたページ (->オリジナル) /