clang  3.7.0
Static Public Member Functions | Public Attributes | Friends | List of all members
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:
[legend]

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. More...
 
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 230 of file ASTUnit.h.

Member Function Documentation

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

Definition at line 1246 of file ASTUnit.cpp.

References MD5, ModTime, clang::Result, and Size.

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

Definition at line 1254 of file ASTUnit.cpp.

References MD5, ModTime, clang::Result, and Size.

Friends And Related Function Documentation

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

Definition at line 250 of file ASTUnit.h.

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

Definition at line 1268 of file ASTUnit.cpp.

Member Data Documentation

llvm::MD5::MD5Result clang::ASTUnit::PreambleFileHash::MD5

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 241 of file ASTUnit.h.

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

time_t clang::ASTUnit::PreambleFileHash::ModTime

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

Definition at line 236 of file ASTUnit.h.

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

off_t clang::ASTUnit::PreambleFileHash::Size

All files have size set.

Definition at line 232 of file ASTUnit.h.

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


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