InstrProfilingRuntime.cpp 650 B

12345678910111213141516171819202122232425262728
  1. //===- InstrProfilingRuntime.cpp - PGO runtime initialization -------------===//
  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. extern "C" {
  9. #include "InstrProfiling.h"
  10. /* int __llvm_profile_runtime */
  11. COMPILER_RT_VISIBILITY int INSTR_PROF_PROFILE_RUNTIME_VAR;
  12. }
  13. namespace {
  14. class RegisterRuntime {
  15. public:
  16. RegisterRuntime() {
  17. __llvm_profile_initialize();
  18. }
  19. };
  20. RegisterRuntime Registration;
  21. }