Skip to content

Commit 75fef2e

Browse files
committed
[rust] Remove constexpr from functions that call non-constexpr functions
The CHECK macros will call non-constexpr functions on failure. While this is legal C++14 as long as the function doesn't actually get called, GCC 5.4 will choke on it.
1 parent 8b2c25d commit 75fef2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ inline uptr RoundUpToPowerOfTwo(uptr size) {
426426
return 1ULL << (up + 1);
427427
}
428428

429-
inline constexpr uptr RoundUpTo(uptr size, uptr boundary) {
429+
inline uptr RoundUpTo(uptr size, uptr boundary) {
430430
RAW_CHECK(IsPowerOfTwo(boundary));
431431
return (size + boundary - 1) & ~(boundary - 1);
432432
}

compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class StackStore {
6161
return frame_idx % kBlockSizeFrames;
6262
}
6363

64-
static constexpr uptr IdToOffset(Id id) {
64+
static uptr IdToOffset(Id id) {
6565
CHECK_NE(id, 0);
6666
return id - 1; // Avoid zero as id.
6767
}

0 commit comments

Comments
 (0)