[PATCH] D92010: [clang-offload-bundler] use std::forward_list for storing temp file names [NFC]
Sergey Dmitriev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 24 08:09:45 PST 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1b0ca81a6c35: [clang-offload-bundler] use std::forward_list for storing temp file names [NFC] (authored by sdmitriev).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92010/new/
https://reviews.llvm.org/D92010
Files:
clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
Index: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
===================================================================
--- clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
+++ clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
@@ -41,6 +41,7 @@
#include <cassert>
#include <cstddef>
#include <cstdint>
+#include <forward_list>
#include <memory>
#include <string>
#include <system_error>
@@ -394,7 +395,7 @@
if (std::error_code EC =
sys::fs::createTemporaryFile("clang-offload-bundler", "tmp", File))
return createFileError(File, EC);
- Files.push_back(File);
+ Files.push_front(File);
if (Contents) {
std::error_code EC;
@@ -403,11 +404,11 @@
return createFileError(File, EC);
OS.write(Contents->data(), Contents->size());
}
- return Files.back();
+ return Files.front();
}
private:
- SmallVector<SmallString<128u>, 4u> Files;
+ std::forward_list<SmallString<128u>> Files;
};
} // end anonymous namespace
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92010.307366.patch
Type: text/x-patch
Size: 1025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201124/7151b27c/attachment.bin>
More information about the cfe-commits
mailing list