LLDB mainline
lldb_private::clike::LanguageOpts Class Reference

Describes the target/language configuration that determines properties of the type system, such as builtin type sizes and encodings. More...

#include <LanguageOpts.h>

Classes

struct  BuiltinSizes
 Sizes (in bytes) of the target-dependent builtin types. More...
struct  FloatSemantics
 The target's float formats. More...

Public Member Functions

const llvm::Triple & GetTriple () const
const BuiltinSizes & GetBuiltinSizes () const
const llvm::fltSemantics & GetFloatTypeSemantics (const size_t byte_size, const lldb::Format format) const
 The floating point semantics for a float of the given storage size.
std::optional< uint64_t > GetBitIntByteSize (unsigned bits) const
 The storage size (in bytes) of a _BitInt(bits) on this target.

Static Public Member Functions

static llvm::Expected< LanguageOpts > Create (llvm::Triple triple)
 The language options for triple, or an error if Clang cannot describe the triple.

Private Member Functions

 LanguageOpts (llvm::Triple triple, std::unique_ptr< clang::TargetInfo > target, BuiltinSizes sizes, FloatSemantics semantics)

Private Attributes

llvm::Triple m_triple
std::unique_ptr< clang::TargetInfo > m_target
BuiltinSizes m_builtin_sizes
FloatSemantics m_semantics

Detailed Description

Describes the target/language configuration that determines properties of the type system, such as builtin type sizes and encodings.

Definition at line 32 of file LanguageOpts.h.

Constructor & Destructor Documentation

◆ LanguageOpts()

LanguageOpts::LanguageOpts ( llvm::Triple triple,
std::unique_ptr< clang::TargetInfo > target,
BuiltinSizes sizes,
FloatSemantics semantics )
private

Definition at line 39 of file LanguageOpts.cpp.

References m_builtin_sizes, m_semantics, m_target, and m_triple.

Referenced by Create().

Member Function Documentation

◆ Create()

◆ GetBitIntByteSize()

std::optional< uint64_t > LanguageOpts::GetBitIntByteSize ( unsigned bits) const

The storage size (in bytes) of a _BitInt(bits) on this target.

Returns std::nullopt if the bit width is invalid for the target.

Definition at line 98 of file LanguageOpts.cpp.

References lldb_private::bits(), and m_target.

◆ GetBuiltinSizes()

const BuiltinSizes & lldb_private::clike::LanguageOpts::GetBuiltinSizes ( ) const
inline

Definition at line 55 of file LanguageOpts.h.

References m_builtin_sizes.

◆ GetFloatTypeSemantics()

const llvm::fltSemantics & LanguageOpts::GetFloatTypeSemantics ( const size_t byte_size,
const lldb::Format format ) const

The floating point semantics for a float of the given storage size.

Definition at line 79 of file LanguageOpts.cpp.

References lldb::eFormatFloat128, m_builtin_sizes, and m_semantics.

◆ GetTriple()

const llvm::Triple & lldb_private::clike::LanguageOpts::GetTriple ( ) const
inline

Definition at line 54 of file LanguageOpts.h.

References m_triple.

Member Data Documentation

◆ m_builtin_sizes

BuiltinSizes lldb_private::clike::LanguageOpts::m_builtin_sizes
private

Definition at line 82 of file LanguageOpts.h.

Referenced by GetBuiltinSizes(), GetFloatTypeSemantics(), and LanguageOpts().

◆ m_semantics

FloatSemantics lldb_private::clike::LanguageOpts::m_semantics
private

Definition at line 83 of file LanguageOpts.h.

Referenced by GetFloatTypeSemantics(), and LanguageOpts().

◆ m_target

std::unique_ptr<clang::TargetInfo> lldb_private::clike::LanguageOpts::m_target
private

Definition at line 81 of file LanguageOpts.h.

Referenced by GetBitIntByteSize(), and LanguageOpts().

◆ m_triple

llvm::Triple lldb_private::clike::LanguageOpts::m_triple
private

Definition at line 80 of file LanguageOpts.h.

Referenced by GetTriple(), and LanguageOpts().


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