Use a different container that preserves existing elements on modification
for storing temporary file names. Current container can make StringRefs
returned earlier invalid on reallocation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp | ||
---|---|---|
411 | What about llvm::iplist? |
clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp | ||
---|---|---|
411 | It can be changed to iplist as well, but why do you think it is a better option here? |
clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp | ||
---|---|---|
411 | Just better to use LLVM API if possible. |
clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp | ||
---|---|---|
411 | 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. |
What about llvm::iplist?