clang 20.0.0git
Classes | Public Member Functions | Public Attributes | List of all members
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.
 
auto 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 1394 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 1432 of file API.h.

◆ APISet() [2/3]

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

◆ APISet() [3/3]

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

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(), createSymbolReference(), and clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::getBases().

◆ 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 1466 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

◆ getLanguage()

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

Get the language used by the APIs.

Definition at line 1400 of file API.h.

Referenced by clang::extractapi::SymbolGraphSerializer::serializeSingleSymbolSGF().

◆ getTarget()

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

Get the target triple for the ExtractAPI invocation.

Definition at line 1397 of file API.h.

◆ getTopLevelRecords()

auto clang::extractapi::APISet::getTopLevelRecords ( ) const
inline

Definition at line 1423 of file API.h.

Referenced by clang::extractapi::APISetVisitor< Derived >::traverseAPISet().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ removeRecord() [1/2]

void APISet::removeRecord ( APIRecord Record)

Definition at line 164 of file API.cpp.

References removeRecord().

◆ removeRecord() [2/2]

void APISet::removeRecord ( StringRef  USR)

Member Data Documentation

◆ ProductName

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

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