clang 23.0.0git
clang::ModuleRef Class Reference

Reference to a module that consists of either an existing/materialized Module object, reference to a serialized submodule record, both, or neither (null). More...

#include "clang/Basic/Module.h"

Public Member Functions

 ModuleRef ()=default
 Create an empty reference.
 ModuleRef (Module *M)
 Create reference to a materialized module.
 ModuleRef (ExternalSubmoduleSource *ExtSrc, uint64_t SubmoduleID)
 Create reference to a serialized submodule record.
ModulegetExisting () const
 Get the existing/materialized module, if there's any.
void setExisting (Module *E)
 Add the existing/materialized module.
void setExternal (ExternalSubmoduleSource *ExtSrc, uint64_t ID)
 Add the serialized submodule record reference.
 operator bool () const
 Check whether this is a non-empty reference.
 operator Module * () const
 Get the existing/materialized module.
Moduleoperator-> () const

Detailed Description

Reference to a module that consists of either an existing/materialized Module object, reference to a serialized submodule record, both, or neither (null).

Definition at line 236 of file Module.h.

Constructor & Destructor Documentation

◆ ModuleRef() [1/3]

clang::ModuleRef::ModuleRef ( )
default

Create an empty reference.

◆ ModuleRef() [2/3]

clang::ModuleRef::ModuleRef ( Module * M)
inline

Create reference to a materialized module.

Definition at line 253 of file Module.h.

◆ ModuleRef() [3/3]

clang::ModuleRef::ModuleRef ( ExternalSubmoduleSource * ExtSrc,
uint64_t SubmoduleID )
inline

Create reference to a serialized submodule record.

Definition at line 256 of file Module.h.

References false.

Member Function Documentation

◆ getExisting()

Module * clang::ModuleRef::getExisting ( ) const
inline

Get the existing/materialized module, if there's any.

Definition at line 260 of file Module.h.

◆ operator bool()

clang::ModuleRef::operator bool ( ) const
inline

Check whether this is a non-empty reference.

Definition at line 271 of file Module.h.

◆ operator Module *()

clang::ModuleRef::operator Module * ( ) const
inline

Get the existing/materialized module.

Try materializing it on-demand from the serialized submodule record if possible.

Definition at line 277 of file Module.h.

◆ operator->()

Module * clang::ModuleRef::operator-> ( ) const
inline

Definition at line 286 of file Module.h.

◆ setExisting()

void clang::ModuleRef::setExisting ( Module * E)
inline

Add the existing/materialized module.

Definition at line 262 of file Module.h.

◆ setExternal()

void clang::ModuleRef::setExternal ( ExternalSubmoduleSource * ExtSrc,
uint64_t ID )
inline

Add the serialized submodule record reference.

Definition at line 265 of file Module.h.


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