clang 23.0.0git
clang::ModuleFileKey Class Reference

Deduplication key for a loaded module file in ModuleManager. More...

#include "clang/Basic/Module.h"

Public Member Functions

 ModuleFileKey (const void *ModuleFile)
 ModuleFileKey (const void *ModuleCacheDir, StringRef PathSuffix)
bool operator== (const ModuleFileKey &Other) const
bool operator!= (const ModuleFileKey &Other) const

Detailed Description

Deduplication key for a loaded module file in ModuleManager.

For implicitly-built modules, this is a pointer representing the module cache directory and the module file name with the (optional) context hash. This enables using inode-based canonicalization of the user-provided module cache path without hitting issues on file systems that recycle inodes for recompiled module files.

For explicitly-built modules, this is FileEntry. This uses FileManager's inode-based canonicalization of the user-provided module file path. Because input explicitly-built modules do not change during the lifetime of the compiler, inode recycling is not of concern here.

Definition at line 69 of file Module.h.

Constructor & Destructor Documentation

◆ ModuleFileKey() [1/2]

clang::ModuleFileKey::ModuleFileKey ( const void * ModuleFile)
inline

Definition at line 79 of file Module.h.

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

◆ ModuleFileKey() [2/2]

clang::ModuleFileKey::ModuleFileKey ( const void * ModuleCacheDir,
StringRef PathSuffix )
inline

Definition at line 81 of file Module.h.

Member Function Documentation

◆ operator!=()

bool clang::ModuleFileKey::operator!= ( const ModuleFileKey & Other) const
inline

Definition at line 89 of file Module.h.

References ModuleFileKey(), operator==(), and clang::Other.

◆ operator==()

bool clang::ModuleFileKey::operator== ( const ModuleFileKey & Other) const
inline

Definition at line 84 of file Module.h.

References ModuleFileKey(), and clang::Other.

Referenced by operator!=().


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