[all-commits] [llvm/llvm-project] 161bdd: [ADT] Make BitmaskEnum operations constant express...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Fri Mar 11 02:12:55 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 161bddf3af09aa883c9414d793de79c89e51636a
https://github.com/llvm/llvm-project/commit/161bddf3af09aa883c9414d793de79c89e51636a
Author: Pavel Labath <pavel at labath.sk>
Date: 2022-03-11 (Fri, 11 Mar 2022)
Changed paths:
M llvm/include/llvm/ADT/BitmaskEnum.h
M llvm/include/llvm/Support/MathExtras.h
M llvm/unittests/ADT/BitmaskEnumTest.cpp
Log Message:
-----------
[ADT] Make BitmaskEnum operations constant expressions
This avoids runtime initialization (a global constructor) whenever they appear
in the initializer.
The patch just adds the constexpr keyword to a couple of functions.
Differential Revision: https://reviews.llvm.org/D121281
More information about the All-commits
mailing list