clang 22.0.0git
clang::extractapi::APISet Class Reference

APISet holds the set of API records collected from given inputs. More...

#include "clang/ExtractAPI/API.h"

Public Member Functions

const llvm::Triple & getTarget () const
 Get the target triple for the ExtractAPI invocation.
Language getLanguage () const
 Get the language used by the APIs.
APIRecordfindRecordForUSR (StringRef USR) const
 Finds the APIRecord for a given USR.
StringRef copyString (StringRef String)
 Copy String into the Allocator in this APISet.
SymbolReference createSymbolReference (StringRef Name, StringRef USR, StringRef Source="")
template<typename RecordTy, typename... CtorArgsContTy>
std::enable_if_t< std::is_base_of_v< APIRecord, RecordTy >, RecordTy > * createRecord (StringRef USR, StringRef Name, CtorArgsContTy &&...CtorArgs)
 Create a subclass of APIRecord and store it in the APISet.
ArrayRef< const APIRecord * > getTopLevelRecords () const
void removeRecord (StringRef USR)
void removeRecord (APIRecord *Record)
 APISet (const llvm::Triple &Target, Language Lang, const std::string &ProductName)
 APISet (const APISet &Other)=delete
APISetoperator= (const APISet &Other)=delete
 APISet (APISet &&Other)=delete
APISetoperator= (APISet &&Other)=delete

Public Attributes

const std::string ProductName

Detailed Description

APISet holds the set of API records collected from given inputs.

Definition at line 1427 of file API.h.

Constructor & Destructor Documentation

◆ APISet() [1/3]

clang::extractapi::APISet::APISet ( const llvm::Triple & Target,
Language Lang,
const std::string & ProductName )
inline

Definition at line 1464 of file API.h.

References ProductName.

Referenced by APISet(), APISet(), operator=(), and operator=().

◆ APISet() [2/3]

clang::extractapi::APISet::APISet ( const APISet & Other)
delete

References APISet(), and clang::Other.

◆ APISet() [3/3]

clang::extractapi::APISet::APISet ( APISet && Other)
delete

References APISet(), and clang::Other.

Member Function Documentation

◆ copyString()

StringRef APISet::copyString ( StringRef String)

Copy String into the Allocator in this APISet.

Returns
a StringRef of the copied string in APISet::Allocator.

Definition at line 121 of file API.cpp.

References memcpy().

Referenced by createRecord(), and createSymbolReference().

◆ createRecord()

template<typename RecordTy, typename... CtorArgsContTy>
std::enable_if_t< std::is_base_of_v< APIRecord, RecordTy >, RecordTy > * clang::extractapi::APISet::createRecord ( StringRef USR,
StringRef Name,
CtorArgsContTy &&... CtorArgs )

Create a subclass of APIRecord and store it in the APISet.

Returns
A pointer to the created record or the already existing record matching this USR.

Definition at line 1498 of file API.h.

References copyString(), and clang::Result.

◆ createSymbolReference()

SymbolReference APISet::createSymbolReference ( StringRef Name,
StringRef USR,
StringRef Source = "" )

◆ findRecordForUSR()

APIRecord * APISet::findRecordForUSR ( StringRef USR) const

Finds the APIRecord for a given USR.

Returns
a pointer to the APIRecord associated with that USR or nullptr.

Definition at line 110 of file API.cpp.

Referenced by removeRecord().

◆ getLanguage()

Language clang::extractapi::APISet::getLanguage ( ) const
inline

Get the language used by the APIs.

Definition at line 1433 of file API.h.

◆ getTarget()

const llvm::Triple & clang::extractapi::APISet::getTarget ( ) const
inline

Get the target triple for the ExtractAPI invocation.

Definition at line 1430 of file API.h.

◆ getTopLevelRecords()

ArrayRef< const APIRecord * > clang::extractapi::APISet::getTopLevelRecords ( ) const
inline

Definition at line 1456 of file API.h.

◆ operator=() [1/2]

APISet & clang::extractapi::APISet::operator= ( APISet && Other)
delete

References APISet(), and clang::Other.

◆ operator=() [2/2]

APISet & clang::extractapi::APISet::operator= ( const APISet & Other)
delete

References APISet(), and clang::Other.

◆ removeRecord() [1/2]

void APISet::removeRecord ( APIRecord * Record)

Definition at line 166 of file API.cpp.

References removeRecord().

◆ removeRecord() [2/2]

void APISet::removeRecord ( StringRef USR)

Definition at line 139 of file API.cpp.

References findRecordForUSR(), and clang::Result.

Referenced by removeRecord().

Member Data Documentation

◆ ProductName

const std::string clang::extractapi::APISet::ProductName

Definition at line 1493 of file API.h.

Referenced by APISet().


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