]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/lib/profile/InstrProfilingRuntime.cc
Imported Upstream version 1.11.0+dfsg1
[rustc.git] / src / compiler-rt / lib / profile / InstrProfilingRuntime.cc
CommitLineData
1a4d82fc
JJ
1//===- 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
3157f602 14COMPILER_RT_VISIBILITY int __llvm_profile_runtime;
1a4d82fc
JJ
15}
16
17namespace {
18
92a42be0 19class RegisterRuntime {
1a4d82fc 20public:
92a42be0
SL
21 RegisterRuntime() {
22 __llvm_profile_register_write_file_atexit();
23 __llvm_profile_initialize_file();
24 }
1a4d82fc
JJ
25};
26
92a42be0 27RegisterRuntime Registration;
1a4d82fc
JJ
28
29}