162a05855SNico Weber //===- InstrProfilingRuntime.cpp - PGO runtime initialization -------------===// 262a05855SNico Weber // 362a05855SNico Weber // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 462a05855SNico Weber // See https://llvm.org/LICENSE.txt for license information. 562a05855SNico Weber // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 662a05855SNico Weber // 762a05855SNico Weber //===----------------------------------------------------------------------===// 862a05855SNico Weber 962a05855SNico Weber extern "C" { 1062a05855SNico Weber 1162a05855SNico Weber #include "InstrProfiling.h" 1262a05855SNico Weber 1362a05855SNico Weber /* int __llvm_profile_runtime */ 1462a05855SNico Weber COMPILER_RT_VISIBILITY int INSTR_PROF_PROFILE_RUNTIME_VAR; 1562a05855SNico Weber } 1662a05855SNico Weber 1762a05855SNico Weber namespace { 1862a05855SNico Weber 1962a05855SNico Weber class RegisterRuntime { 2062a05855SNico Weber public: RegisterRuntime()2162a05855SNico Weber RegisterRuntime() { 22*32bddad3SPetr Hosek __llvm_profile_initialize(); 2362a05855SNico Weber } 2462a05855SNico Weber }; 2562a05855SNico Weber 2662a05855SNico Weber RegisterRuntime Registration; 2762a05855SNico Weber 2862a05855SNico Weber } 29