[PATCH] D115043: [clang][deps] Use MemoryBuffer in minimizing FS
Jan Svoboda via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 3 07:48:20 PST 2021
jansvoboda11 added inline comments.
================
Comment at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:54
+ /// and invoke the given function right after the move.
+ SmallVectorMemoryBuffer(
+ SmallVectorImpl<char> &&SV,
----------------
I'm not happy with introducing new (hacky) constructor.
But, the best alternative I could come up with is to avoid using `SmallVectorMemoryBuffer`, store the `SmallString` with minimized contents somewhere in the filesystem and refer to it via regular `MemoryBuffer`. This seems needlessly complicated, so hacky constructor it is...
Side question: is the hassle with implicit null-termination (expected by Clang's lexer) worth the complications? What are the benefits anyway?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115043/new/
https://reviews.llvm.org/D115043
More information about the llvm-commits
mailing list