llvm.org GIT mirror llvm / 761281e
[LTO] Remove unused Path parameter to AddBufferFn Summary: With D43396, no clients use the Path parameter anymore. Depends on D43396. Reviewers: pcc Subscribers: mehdi_amini, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D43400 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325619 91177308-0d34-0410-b5e6-96231b3b80d8 Teresa Johnson 2 years ago
4 changed file(s) with 5 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
2323 /// This type defines the callback to add a pre-existing native object file
2424 /// (e.g. in a cache).
2525 ///
26 /// Path is generally expected to be a valid path for the file at the point when
27 /// the AddBufferFn function is called, but clients should prefer to access MB
28 /// directly in order to avoid a potential race condition.
29 ///
3026 /// Buffer callbacks must be thread safe.
31 typedef std::function MB,
32 StringRef Path)>
27 typedef std::function MB)>
3328 AddBufferFn;
3429
3530 /// Create a local file system cache which uses the given cache directory and
3535 ErrorOr> MBOrErr =
3636 MemoryBuffer::getFile(EntryPath);
3737 if (MBOrErr) {
38 AddBuffer(Task, std::move(*MBOrErr), EntryPath);
38 AddBuffer(Task, std::move(*MBOrErr));
3939 return AddStreamFn();
4040 }
4141
102102 TempFile.TmpName + " to " + EntryPath + ": " +
103103 toString(std::move(E)) + "\n");
104104
105 AddBuffer(Task, std::move(*MBOrErr), EntryPath);
105 AddBuffer(Task, std::move(*MBOrErr));
106106 }
107107 };
108108
916916 llvm::make_unique(FD, true));
917917 };
918918
919 auto AddBuffer = [&](size_t Task, std::unique_ptr MB,
920 StringRef Path) {
919 auto AddBuffer = [&](size_t Task, std::unique_ptr MB) {
921920 *AddStream(Task)->OS << MB->getBuffer();
922921 };
923922
295295 return llvm::make_unique(std::move(S));
296296 };
297297
298 auto AddBuffer = [&](size_t Task, std::unique_ptr MB,
299 StringRef Path) {
298 auto AddBuffer = [&](size_t Task, std::unique_ptr MB) {
300299 *AddStream(Task)->OS << MB->getBuffer();
301300 };
302301