1*5ffd83dbSDimitry Andric /*===- InstrProfilingInternal.c - Support library for PGO instrumentation -===*\ 2*5ffd83dbSDimitry Andric |* 3*5ffd83dbSDimitry Andric |* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*5ffd83dbSDimitry Andric |* See https://llvm.org/LICENSE.txt for license information. 5*5ffd83dbSDimitry Andric |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*5ffd83dbSDimitry Andric |* 7*5ffd83dbSDimitry Andric \*===----------------------------------------------------------------------===*/ 8*5ffd83dbSDimitry Andric 9*5ffd83dbSDimitry Andric #if !defined(__Fuchsia__) 10*5ffd83dbSDimitry Andric 11*5ffd83dbSDimitry Andric #include "InstrProfilingInternal.h" 12*5ffd83dbSDimitry Andric 13*5ffd83dbSDimitry Andric static unsigned ProfileDumped = 0; 14*5ffd83dbSDimitry Andric 15*5ffd83dbSDimitry Andric COMPILER_RT_VISIBILITY unsigned lprofProfileDumped() { 16*5ffd83dbSDimitry Andric return ProfileDumped; 17*5ffd83dbSDimitry Andric } 18*5ffd83dbSDimitry Andric 19*5ffd83dbSDimitry Andric COMPILER_RT_VISIBILITY void lprofSetProfileDumped(unsigned Value) { 20*5ffd83dbSDimitry Andric ProfileDumped = Value; 21*5ffd83dbSDimitry Andric } 22*5ffd83dbSDimitry Andric 23*5ffd83dbSDimitry Andric static unsigned RuntimeCounterRelocation = 0; 24*5ffd83dbSDimitry Andric 25*5ffd83dbSDimitry Andric COMPILER_RT_VISIBILITY unsigned lprofRuntimeCounterRelocation(void) { 26*5ffd83dbSDimitry Andric return RuntimeCounterRelocation; 27*5ffd83dbSDimitry Andric } 28*5ffd83dbSDimitry Andric 29*5ffd83dbSDimitry Andric COMPILER_RT_VISIBILITY void lprofSetRuntimeCounterRelocation(unsigned Value) { 30*5ffd83dbSDimitry Andric RuntimeCounterRelocation = Value; 31*5ffd83dbSDimitry Andric } 32*5ffd83dbSDimitry Andric 33*5ffd83dbSDimitry Andric #endif 34