clang API Documentation

Static Public Member Functions | Public Attributes | Friends
clang::ASTUnit::PreambleFileHash Struct Reference

Data used to determine if a file used in the preamble has been changed. More...

#include <ASTUnit.h>

Collaboration diagram for clang::ASTUnit::PreambleFileHash:
Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static PreambleFileHash createForFile (off_t Size, time_t ModTime)
static PreambleFileHash createForMemoryBuffer (const llvm::MemoryBuffer *Buffer)

Public Attributes

off_t Size
 All files have size set.
time_t ModTime
llvm::MD5::MD5Result MD5

Friends

bool operator== (const PreambleFileHash &LHS, const PreambleFileHash &RHS)
bool operator!= (const PreambleFileHash &LHS, const PreambleFileHash &RHS)

Detailed Description

Data used to determine if a file used in the preamble has been changed.

Definition at line 228 of file ASTUnit.h.


Member Function Documentation

ASTUnit::PreambleFileHash ASTUnit::PreambleFileHash::createForFile ( off_t  Size,
time_t  ModTime 
) [static]

Definition at line 1237 of file ASTUnit.cpp.

References MD5, ModTime, and Size.

ASTUnit::PreambleFileHash ASTUnit::PreambleFileHash::createForMemoryBuffer ( const llvm::MemoryBuffer *  Buffer) [static]

Definition at line 1245 of file ASTUnit.cpp.

References MD5, ModTime, and Size.


Friends And Related Function Documentation

bool operator!= ( const PreambleFileHash LHS,
const PreambleFileHash RHS 
) [friend]

Definition at line 248 of file ASTUnit.h.

bool operator== ( const PreambleFileHash LHS,
const PreambleFileHash RHS 
) [friend]

Definition at line 1259 of file ASTUnit.cpp.


Member Data Documentation

Memory buffers have MD5 instead of modification time. We don't compute MD5 for on-disk files because we hope that modification time is enough to tell if the file was changed.

Definition at line 239 of file ASTUnit.h.

Referenced by createForFile(), createForMemoryBuffer(), and clang::operator==().

Modification time is set for files that are on disk. For memory buffers it is zero.

Definition at line 234 of file ASTUnit.h.

Referenced by createForFile(), createForMemoryBuffer(), and clang::operator==().

All files have size set.

Definition at line 230 of file ASTUnit.h.

Referenced by createForFile(), createForMemoryBuffer(), and clang::operator==().


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