LLDB  mainline
Public Member Functions | Public Attributes | List of all members
lldb_private::LanguageSet Struct Reference

A SmallBitVector that represents a set of source languages (lldb::LanguageType). More...

#include <TypeSystem.h>

Collaboration diagram for lldb_private::LanguageSet:
Collaboration graph
[legend]

Public Member Functions

 LanguageSet ()
 
llvm::Optional< lldb::LanguageTypeGetSingularLanguage ()
 If the set contains a single language only, return it. More...
 
void Insert (lldb::LanguageType language)
 
bool Empty () const
 
size_t Size () const
 
bool operator[] (unsigned i) const
 

Public Attributes

llvm::SmallBitVector bitvector
 

Detailed Description

A SmallBitVector that represents a set of source languages (lldb::LanguageType).

Each lldb::LanguageType is represented by the bit with the position of its enumerator. The largest LanguageType is < 64, so this is space-efficient and on 64-bit architectures a LanguageSet can be completely stack-allocated.

Definition at line 40 of file TypeSystem.h.

Constructor & Destructor Documentation

◆ LanguageSet()

LanguageSet::LanguageSet ( )

Definition at line 25 of file TypeSystem.cpp.

Member Function Documentation

◆ Empty()

bool LanguageSet::Empty ( ) const

◆ GetSingularLanguage()

llvm::Optional< LanguageType > LanguageSet::GetSingularLanguage ( )

If the set contains a single language only, return it.

Definition at line 27 of file TypeSystem.cpp.

References bitvector.

Referenced by lldb_private::Target::GetREPL(), and lldb_private::Debugger::RunREPL().

◆ Insert()

void LanguageSet::Insert ( lldb::LanguageType  language)

◆ operator[]()

bool LanguageSet::operator[] ( unsigned  i) const

Definition at line 36 of file TypeSystem.cpp.

References bitvector.

◆ Size()

size_t LanguageSet::Size ( ) const

Definition at line 34 of file TypeSystem.cpp.

References bitvector.

Member Data Documentation

◆ bitvector

llvm::SmallBitVector lldb_private::LanguageSet::bitvector

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