Duncan P. N. Exon Smith | 775c178a | 2014-03-20 19:23:53 +0000 | [diff] [blame^] | 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 | |
| 10 | extern "C" { |
| 11 | |
| 12 | #include "InstrProfilingExtras.h" |
| 13 | |
| 14 | extern int __llvm_pgo_runtime; |
| 15 | int __llvm_pgo_runtime; |
| 16 | |
| 17 | } |
| 18 | |
| 19 | namespace { |
| 20 | |
| 21 | class RegisterAtExit { |
| 22 | public: |
| 23 | RegisterAtExit() { __llvm_pgo_register_write_atexit(); } |
| 24 | }; |
| 25 | |
| 26 | RegisterAtExit Registration; |
| 27 | |
| 28 | } |