clang 24.0.0git
clang::Builtin::TargetBuiltins Class Reference

The builtins of a target and an optional aux target: their shards, and a hash table from their names to their builtin IDs. More...

#include "clang/Basic/Builtins.h"

Public Member Functions

 TargetBuiltins (const TargetInfo &Target, const TargetInfo *AuxTarget)
 Collect the builtins of Target and AuxTarget, which may be null.
llvm::ArrayRef< InfosShard > getTargetShards () const
 The shards of the target's builtins.
llvm::ArrayRef< InfosShard > getAuxTargetShards () const
 The shards of the aux target's builtins.
unsigned getNumTargetBuiltins () const
std::pair< const InfosShard &, const Info & > getShardAndInfo (unsigned ID) const
 Return the shard of the builtin with ID and its info.
llvm::SmallVector< unsigned, 2 > lookup (llvm::StringRef Name) const
 Return the IDs of all builtins named Name, in no particular order.

Detailed Description

The builtins of a target and an optional aux target: their shards, and a hash table from their names to their builtin IDs.

It contains every builtin of the targets, whether or not it's supported by some language options; Context checks that when looking a name up. It's immutable, so any number of contexts for the same targets can use it, also concurrently.

Definition at line 240 of file Builtins.h.

Constructor & Destructor Documentation

◆ TargetBuiltins()

Builtin::TargetBuiltins::TargetBuiltins ( const TargetInfo & Target,
const TargetInfo * AuxTarget )

Member Function Documentation

◆ getAuxTargetShards()

llvm::ArrayRef< InfosShard > clang::Builtin::TargetBuiltins::getAuxTargetShards ( ) const
inline

The shards of the aux target's builtins.

Definition at line 268 of file Builtins.h.

Referenced by areBuiltinsFor(), getShardAndInfo(), and TargetBuiltins().

◆ getNumTargetBuiltins()

unsigned clang::Builtin::TargetBuiltins::getNumTargetBuiltins ( ) const
inline

Definition at line 272 of file Builtins.h.

◆ getShardAndInfo()

std::pair< const Builtin::InfosShard &, const Builtin::Info & > Builtin::TargetBuiltins::getShardAndInfo ( unsigned ID) const

Return the shard of the builtin with ID and its info.

Definition at line 333 of file Builtins.cpp.

References clang::Builtin::FirstTSBuiltin, getAuxTargetShards(), and getTargetShards().

◆ getTargetShards()

llvm::ArrayRef< InfosShard > clang::Builtin::TargetBuiltins::getTargetShards ( ) const
inline

The shards of the target's builtins.

Definition at line 263 of file Builtins.h.

Referenced by areBuiltinsFor(), getShardAndInfo(), and TargetBuiltins().

◆ lookup()

SmallVector< unsigned, 2 > Builtin::TargetBuiltins::lookup ( llvm::StringRef Name) const

Return the IDs of all builtins named Name, in no particular order.

Definition at line 361 of file Builtins.cpp.

References hashBuiltinName(), and clang::ast_matchers::hasName().


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