CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
anonymous_namespace{debug.hh}::SourceLocation Struct Reference

Our libc++ does not currently provide source_location, but our clang provides the necessary builtins for one. More...

#include <debug.hh>

Public Member Functions

constexpr SourceLocation (int lineNumber, int columnNumber, const char *fileName, const char *functionName)
 Explicitly construct a source location.
constexpr int line () const noexcept
 Returns the line number for this source location.
constexpr int column () const noexcept
 Returns the column number for this source location.
constexpr const char * file_name () const noexcept
 Returns the file name for this source location.
constexpr const char * function_name () const noexcept
 Returns the function name for this source location.

Static Public Member Functions

static constexpr SourceLocation current (int lineNumber=__builtin_LINE(), int columnNumber=__builtin_COLUMN(), const char *fileName=__builtin_FILE(), const char *functionName=__builtin_FUNCTION()) noexcept
 Construct a source location for the caller.

Detailed Description

Our libc++ does not currently provide source_location, but our clang provides the necessary builtins for one.

Definition at line 610 of file debug.hh.

Constructor & Destructor Documentation

◆ SourceLocation()

anonymous_namespace{debug.hh}::SourceLocation::SourceLocation ( int lineNumber,
int columnNumber,
const char * fileName,
const char * functionName )
inlineconstexpr

Explicitly construct a source location.

Definition at line 615 of file debug.hh.

Member Function Documentation

◆ column()

int anonymous_namespace{debug.hh}::SourceLocation::column ( ) const
inlinenodiscardconstexprnoexcept

Returns the column number for this source location.

Definition at line 644 of file debug.hh.

◆ current()

◆ file_name()

const char * anonymous_namespace{debug.hh}::SourceLocation::file_name ( ) const
inlinenodiscardconstexprnoexcept

Returns the file name for this source location.

Definition at line 650 of file debug.hh.

◆ function_name()

const char * anonymous_namespace{debug.hh}::SourceLocation::function_name ( ) const
inlinenodiscardconstexprnoexcept

Returns the function name for this source location.

Definition at line 656 of file debug.hh.

◆ line()

int anonymous_namespace{debug.hh}::SourceLocation::line ( ) const
inlinenodiscardconstexprnoexcept

Returns the line number for this source location.

Definition at line 639 of file debug.hh.

Referenced by anonymous_namespace{debug.hh}::ConditionalDebug< Threshold, Context, EnableAssertions, VerboseInvariants >::report_failure().


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