[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 07:35:50 PST 2020
sdmitriev added inline comments.
================
Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:411
private:
- SmallVector<SmallString<128u>, 4u> Files;
+ std::forward_list<SmallString<128u>> Files;
};
----------------
ABataev wrote:
> sdmitriev wrote:
> > ABataev wrote:
> > > What about `llvm::iplist`?
> > It can be changed to iplist as well, but why do you think it is a better option here?
> Just better to use LLVM API if possible.
Well, I do not think it will bring any benefits here compared to the forward_list. iplist is an intrusive list, so it requires an element to provide access to prev/next elements in the list, and because of that element type should be derived from ilist_node. So, switching to iplist would require adding one more class for the list element type. I agree that it is not difficult to do, but I just do not see why it needs to be done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92010/new/
https://reviews.llvm.org/D92010
More information about the cfe-commits
mailing list