summaryrefslogtreecommitdiff
path: root/gnu/llvm/compiler-rt/lib/profile/InstrProfilingBuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/compiler-rt/lib/profile/InstrProfilingBuffer.c')
-rw-r--r--gnu/llvm/compiler-rt/lib/profile/InstrProfilingBuffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/llvm/compiler-rt/lib/profile/InstrProfilingBuffer.c b/gnu/llvm/compiler-rt/lib/profile/InstrProfilingBuffer.c
index 174280fd4b5..5ee44785a7a 100644
--- a/gnu/llvm/compiler-rt/lib/profile/InstrProfilingBuffer.c
+++ b/gnu/llvm/compiler-rt/lib/profile/InstrProfilingBuffer.c
@@ -62,7 +62,8 @@ void __llvm_profile_get_padding_sizes_for_counters(
uint64_t DataSize, uint64_t CountersSize, uint64_t NamesSize,
uint64_t *PaddingBytesBeforeCounters, uint64_t *PaddingBytesAfterCounters,
uint64_t *PaddingBytesAfterNames) {
- if (!__llvm_profile_is_continuous_mode_enabled()) {
+ if (!__llvm_profile_is_continuous_mode_enabled() ||
+ lprofRuntimeCounterRelocation()) {
*PaddingBytesBeforeCounters = 0;
*PaddingBytesAfterCounters = 0;
*PaddingBytesAfterNames = __llvm_profile_get_num_padding_bytes(NamesSize);