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