[PATCH] D43400: [LTO] Remove unused Path parameter to AddBufferFn
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 12:24:08 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL325619: [LTO] Remove unused Path parameter to AddBufferFn (authored by tejohnson, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D43400
Files:
llvm/trunk/include/llvm/LTO/Caching.h
llvm/trunk/lib/LTO/Caching.cpp
llvm/trunk/tools/gold/gold-plugin.cpp
llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp
Index: llvm/trunk/include/llvm/LTO/Caching.h
===================================================================
--- llvm/trunk/include/llvm/LTO/Caching.h
+++ llvm/trunk/include/llvm/LTO/Caching.h
@@ -24,13 +24,8 @@
/// This type defines the callback to add a pre-existing native object file
/// (e.g. in a cache).
///
-/// Path is generally expected to be a valid path for the file at the point when
-/// the AddBufferFn function is called, but clients should prefer to access MB
-/// directly in order to avoid a potential race condition.
-///
/// Buffer callbacks must be thread safe.
-typedef std::function<void(unsigned Task, std::unique_ptr<MemoryBuffer> MB,
- StringRef Path)>
+typedef std::function<void(unsigned Task, std::unique_ptr<MemoryBuffer> MB)>
AddBufferFn;
/// Create a local file system cache which uses the given cache directory and
Index: llvm/trunk/lib/LTO/Caching.cpp
===================================================================
--- llvm/trunk/lib/LTO/Caching.cpp
+++ llvm/trunk/lib/LTO/Caching.cpp
@@ -36,7 +36,7 @@
ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr =
MemoryBuffer::getFile(EntryPath);
if (MBOrErr) {
- AddBuffer(Task, std::move(*MBOrErr), EntryPath);
+ AddBuffer(Task, std::move(*MBOrErr));
return AddStreamFn();
}
@@ -103,7 +103,7 @@
TempFile.TmpName + " to " + EntryPath + ": " +
toString(std::move(E)) + "\n");
- AddBuffer(Task, std::move(*MBOrErr), EntryPath);
+ AddBuffer(Task, std::move(*MBOrErr));
}
};
Index: llvm/trunk/tools/gold/gold-plugin.cpp
===================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp
+++ llvm/trunk/tools/gold/gold-plugin.cpp
@@ -917,8 +917,7 @@
llvm::make_unique<llvm::raw_fd_ostream>(FD, true));
};
- auto AddBuffer = [&](size_t Task, std::unique_ptr<MemoryBuffer> MB,
- StringRef Path) {
+ auto AddBuffer = [&](size_t Task, std::unique_ptr<MemoryBuffer> MB) {
*AddStream(Task)->OS << MB->getBuffer();
};
Index: llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp
===================================================================
--- llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp
+++ llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp
@@ -296,8 +296,7 @@
return llvm::make_unique<lto::NativeObjectStream>(std::move(S));
};
- auto AddBuffer = [&](size_t Task, std::unique_ptr<MemoryBuffer> MB,
- StringRef Path) {
+ auto AddBuffer = [&](size_t Task, std::unique_ptr<MemoryBuffer> MB) {
*AddStream(Task)->OS << MB->getBuffer();
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43400.135122.patch
Type: text/x-patch
Size: 2696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180220/0f0e3e07/attachment.bin>
More information about the llvm-commits
mailing list