1 //===- InstrProfilingRuntime.cpp - PGO runtime initialization -------------===//
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
7 //===----------------------------------------------------------------------===//
11 #include "InstrProfiling.h"
13 /* int __llvm_profile_runtime */
14 COMPILER_RT_VISIBILITY int INSTR_PROF_PROFILE_RUNTIME_VAR;
19 class RegisterRuntime {
22 __llvm_profile_initialize_file();
23 if (!__llvm_profile_is_continuous_mode_enabled())
24 __llvm_profile_register_write_file_atexit();
28 RegisterRuntime Registration;