Skip to content

Commit 487598f

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 203b5d5 commit 487598f

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
@@ -443,7 +443,7 @@ inline uptr RoundUpToPowerOfTwo(uptr size) {
443443
return 1ULL << (up + 1);
444444
}
445445

446-
inline constexpr uptr RoundUpTo(uptr size, uptr boundary) {
446+
inline uptr RoundUpTo(uptr size, uptr boundary) {
447447
RAW_CHECK(IsPowerOfTwo(boundary));
448448
return (size + boundary - 1) & ~(boundary - 1);
449449
}

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)