clang: include/clang/Serialization/ModuleCache.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_CLANG_SERIALIZATION_MODULECACHE_H

10#define LLVM_CLANG_SERIALIZATION_MODULECACHE_H

11

13#include "llvm/ADT/IntrusiveRefCntPtr.h"

14

15#include

16

17namespace llvm {

18class AdvisoryLock;

19}

20

23

24

25

27public:

28

29

31

32

33 virtual std::unique_ptrllvm::AdvisoryLock

34 getLock(StringRef ModuleFilename) = 0;

35

36

37

38

39

40

41

43

44

45

47

48

49 virtual void maybePrune(StringRef Path, time_t PruneInterval,

50 time_t PruneAfter) = 0;

51

52

55

56

57

59};

60

61

62

63

64

66

67

68void maybePruneImpl(StringRef Path, time_t PruneInterval, time_t PruneAfter);

69}

70

71#endif

Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.

In-memory cache for modules.

The module cache used for compiling modules implicitly.

Definition ModuleCache.h:26

virtual void prepareForGetLock(StringRef ModuleFilename)=0

May perform any work that only needs to be performed once for multiple calls getLock() with the same ...

virtual ~ModuleCache()=default

virtual const InMemoryModuleCache & getInMemoryModuleCache() const =0

virtual std::time_t getModuleTimestamp(StringRef ModuleFilename)=0

Returns the timestamp denoting the last time inputs of the module file were validated.

virtual InMemoryModuleCache & getInMemoryModuleCache()=0

Returns this process's view of the module cache.

virtual void updateModuleTimestamp(StringRef ModuleFilename)=0

Updates the timestamp denoting the last time inputs of the module file were validated.

virtual void maybePrune(StringRef Path, time_t PruneInterval, time_t PruneAfter)=0

Prune module files that haven't been accessed in a long time.

virtual std::unique_ptr< llvm::AdvisoryLock > getLock(StringRef ModuleFilename)=0

Returns lock for the given module file. The lock is initially unlocked.

The JSON file list parser is used to communicate input to InstallAPI.

IntrusiveRefCntPtr< ModuleCache > createCrossProcessModuleCache()

Creates new ModuleCache backed by a file system directory that may be operated on by multiple process...

void maybePruneImpl(StringRef Path, time_t PruneInterval, time_t PruneAfter)

Shared implementation of ModuleCache::maybePrune().

Diagnostic wrappers for TextAPI types for error reporting.