[llvm] r325619 - [LTO] Remove unused Path parameter to AddBufferFn
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 12:21:53 PST 2018
Author: tejohnson
Date: Tue Feb 20 12:21:53 2018
New Revision: 325619
URL: http://llvm.org/viewvc/llvm-project?rev=325619&view=rev
Log:
[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
Modified:
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
Modified: llvm/trunk/include/llvm/LTO/Caching.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LTO/Caching.h?rev=325619&r1=325618&r2=325619&view=diff
==============================================================================
--- llvm/trunk/include/llvm/LTO/Caching.h (original)
+++ llvm/trunk/include/llvm/LTO/Caching.h Tue Feb 20 12:21:53 2018
@@ -24,13 +24,8 @@ namespace lto {
/// 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
Modified: llvm/trunk/lib/LTO/Caching.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/Caching.cpp?rev=325619&r1=325618&r2=325619&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/Caching.cpp (original)
+++ llvm/trunk/lib/LTO/Caching.cpp Tue Feb 20 12:21:53 2018
@@ -36,7 +36,7 @@ Expected<NativeObjectCache> lto::localCa
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 @@ Expected<NativeObjectCache> lto::localCa
TempFile.TmpName + " to " + EntryPath + ": " +
toString(std::move(E)) + "\n");
- AddBuffer(Task, std::move(*MBOrErr), EntryPath);
+ AddBuffer(Task, std::move(*MBOrErr));
}
};
Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=325619&r1=325618&r2=325619&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Tue Feb 20 12:21:53 2018
@@ -917,8 +917,7 @@ static ld_plugin_status allSymbolsReadHo
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();
};
Modified: llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp?rev=325619&r1=325618&r2=325619&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp (original)
+++ llvm/trunk/tools/llvm-lto2/llvm-lto2.cpp Tue Feb 20 12:21:53 2018
@@ -296,8 +296,7 @@ static int run(int argc, char **argv) {
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();
};
More information about the llvm-commits
mailing list