clang  19.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. More...
 
Language getLanguage () const
 Get the language used by the APIs. More...
 
APIRecordfindRecordForUSR (StringRef USR) const
 Finds the APIRecord for a given USR. More...
 
StringRef copyString (StringRef String)
 Copy String into the Allocator in this APISet. More...
 
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. More...
 
ArrayRef< const APIRecord * > getTopLevelRecords () const
 
 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 1400 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 1433 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 100 of file API.cpp.

References memcpy().

Referenced by 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 1467 of file API.h.

◆ 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 1406 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 1403 of file API.h.

◆ getTopLevelRecords()

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

Definition at line 1429 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

Member Data Documentation

◆ ProductName

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

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