@@ -53,27 +53,14 @@ class ModuleCacheEntry {
53
53
// Access the path to this entry in the cache.
54
54
virtual std::string getEntryPath () = 0;
55
55
56
- // / Attempt to asynchronously load the cached buffer and invoke the callback.
57
- // / Cache miss is represented as std::error_code().
58
- virtual void tryLoadingBuffer (
59
- std::function<void (ErrorOr<std::unique_ptr<MemoryBuffer>>)> Cb) = 0;
60
-
61
- // / Attempt to asynchronously write the computed buffer and invoke the
62
- // / callback.
63
- virtual void write (const MemoryBuffer &OutputBuffer,
64
- std::function<void ()> Cb) = 0;
65
-
56
+ virtual ErrorOr<std::unique_ptr<MemoryBuffer>> tryLoadingBuffer () = 0;
57
+ virtual void write (const MemoryBuffer &OutputBuffer) = 0;
66
58
virtual Error writeObject (const MemoryBuffer &OutputBuffer,
67
59
StringRef OutputPath);
68
60
virtual std::optional<std::unique_ptr<MemoryBuffer>> getMappedBuffer () {
69
61
return std::nullopt;
70
62
}
71
63
72
- // / Check whether the loaded and written results of this entry are identical.
73
- // / This is only called when DeterministicCheck is enabled, and after both
74
- // / \c tryLoadingBuffer() and \c write() have finished.
75
- virtual bool areLoadedAndWrittenResultsIdentical () const { return true ; }
76
-
77
64
virtual ~ModuleCacheEntry () {}
78
65
79
66
static std::optional<std::string> computeCacheKey (
@@ -85,8 +72,6 @@ class ModuleCacheEntry {
85
72
bool Freestanding, const TargetMachineBuilder &TMBuilder);
86
73
};
87
74
88
- struct CancellationToken ;
89
-
90
75
// / This class define an interface similar to the LTOCodeGenerator, but adapted
91
76
// / for ThinLTO processing.
92
77
// / The ThinLTOCodeGenerator is not intended to be reuse for multiple
@@ -185,8 +170,6 @@ class ThinLTOCodeGenerator {
185
170
186
171
// / Create a cache entry for the module
187
172
std::unique_ptr<ModuleCacheEntry> createModuleCacheEntry (
188
- std::shared_ptr<CancellationToken> GetCancelTok,
189
- std::shared_ptr<CancellationToken> PutCancelTok,
190
173
const ModuleSummaryIndex &Index, StringRef ModuleID, StringRef OutputPath,
191
174
const FunctionImporter::ImportMapTy &ImportList,
192
175
const FunctionImporter::ExportSetTy &ExportList,
0 commit comments