[PATCH] D30010: Improve the robustness of mmap
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 09:59:36 PST 2017
zturner added a comment.
Actually one way to do this while simultaneously **reducing** parameter list explosion might be to make a flags enum, and merge some of the existing ones in. Right now we already have `RequiresNullTerminator` and `IsVolatileSize`. We could have:
enum class MemBufferFlags {
RequiresNullTerminator = 0x1,
IsVolatileSize = 0x2,
LongLived = 0x4
};
Then each function could just take a `MemBufferFlags` with appropriate default value instead of a list of bools.
https://reviews.llvm.org/D30010
More information about the llvm-commits
mailing list