[all-commits] [llvm/llvm-project] 23a94a: [scudo] Make Vector() constexpr
Kostya Kortchinsky via All-commits
all-commits at lists.llvm.org
Tue Aug 3 08:25:58 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 23a94af44939b094f9ba2d6bb969f5a48b78fa8c
https://github.com/llvm/llvm-project/commit/23a94af44939b094f9ba2d6bb969f5a48b78fa8c
Author: Kostya Kortchinsky <kostyak at google.com>
Date: 2021-08-03 (Tue, 03 Aug 2021)
Changed paths:
M compiler-rt/lib/scudo/standalone/vector.h
Log Message:
-----------
[scudo] Make Vector() constexpr
A `Vector` that doesn't require an initial `reserve()` (eg: with a
default, or small enough capacity) can have a constant initializer.
This changes the code in a few places to make that possible:
- mark a few other functions as `constexpr`
- do without any `reinterpret_cast`
- allow to skip `reserve` from `init`
Differential Revision: https://reviews.llvm.org/D107308
More information about the All-commits
mailing list