blob: 081ecb29e9874011622100484e49204ae229ea0b [file] [log] [blame]
Stephen Hines2d1fdb22014-05-28 23:58:16 -07001//===- InstrProfilingRuntime.cpp - PGO runtime initialization -------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10extern "C" {
11
12#include "InstrProfiling.h"
13
14__attribute__((visibility("hidden"))) int __llvm_profile_runtime;
15
16}
17
18namespace {
19
20class RegisterRuntime {
21public:
22 RegisterRuntime() {
23 __llvm_profile_register_write_file_atexit();
24 __llvm_profile_initialize_file();
25 }
26};
27
28RegisterRuntime Registration;
29
30}