comparison include/llvm/LTO/Caching.h @ 120:1172e4bd9c6f

update 4.0.0
author mir3636
date Fri, 25 Nov 2016 19:14:25 +0900
parents
children 803732b1fca8
comparison
equal deleted inserted replaced
101:34baf5011add 120:1172e4bd9c6f
1 //===- Caching.h - LLVM Link Time Optimizer Configuration -----------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the localCache function, which allows clients to add a
11 // filesystem cache to ThinLTO.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_LTO_CACHING_H
16 #define LLVM_LTO_CACHING_H
17
18 #include "llvm/LTO/LTO.h"
19 #include <string>
20
21 namespace llvm {
22 namespace lto {
23
24 /// This type defines the callback to add a pre-existing native object file
25 /// (e.g. in a cache).
26 ///
27 /// File callbacks must be thread safe.
28 typedef std::function<void(unsigned Task, StringRef Path)> AddFileFn;
29
30 /// Create a local file system cache which uses the given cache directory and
31 /// file callback.
32 NativeObjectCache localCache(std::string CacheDirectoryPath, AddFileFn AddFile);
33
34 } // namespace lto
35 } // namespace llvm
36
37 #endif