Skip to content

Commit ce54836

Browse files
committed
consexprs added
1 parent 2e23682 commit ce54836

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler-rt/lib/scudo/standalone/memtag.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ inline void enableSystemMemoryTaggingTestOnly() {
108108

109109
#else // !SCUDO_CAN_USE_MTE
110110

111-
inline bool systemSupportsMemoryTagging() { return false; }
111+
inline constexpr bool systemSupportsMemoryTagging() { return false; }
112112

113113
inline NORETURN bool systemDetectsMemoryTagFaultsTestOnly() {
114114
UNREACHABLE("memory tagging not supported");
@@ -261,7 +261,7 @@ inline uptr loadTag(uptr Ptr) {
261261

262262
#else
263263

264-
inline bool systemSupportsMemoryTagging() { return false; }
264+
inline constexpr bool systemSupportsMemoryTagging() { return false; }
265265

266266
inline NORETURN bool systemDetectsMemoryTagFaultsTestOnly() {
267267
UNREACHABLE("memory tagging not supported");

compiler-rt/lib/scudo/standalone/options.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ struct Options {
3838
}
3939
};
4040

41-
template <typename Config> bool useMemoryTagging(const Options &Options) {
41+
template <typename Config>
42+
constexpr bool useMemoryTagging(const Options &Options) {
4243
return allocatorSupportsMemoryTagging<Config>() &&
4344
Options.get(OptionBit::UseMemoryTagging);
4445
}

0 commit comments

Comments
 (0)