InstrProfilingInternal.c 801 B

1234567891011121314151617181920212223242526
  1. /*===- InstrProfilingInternal.c - Support library for PGO instrumentation -===*\
  2. |*
  3. |* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. |* See https://llvm.org/LICENSE.txt for license information.
  5. |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. |*
  7. \*===----------------------------------------------------------------------===*/
  8. // Note: This is linked into the Darwin kernel, and must remain compatible
  9. // with freestanding compilation. See `darwin_add_builtin_libraries`.
  10. #if !defined(__Fuchsia__)
  11. #include "InstrProfilingInternal.h"
  12. static unsigned ProfileDumped = 0;
  13. COMPILER_RT_VISIBILITY unsigned lprofProfileDumped() {
  14. return ProfileDumped;
  15. }
  16. COMPILER_RT_VISIBILITY void lprofSetProfileDumped(unsigned Value) {
  17. ProfileDumped = Value;
  18. }
  19. #endif