| Duncan P. N. Exon Smith | c962cda | 2014-03-20 19:39:01 +0000 | [diff] [blame] | 1 | /*===- InstrProfilingExtras.h - Support library for PGO instrumentation ---===*\ |
| 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 | /*! |
| 11 | * \brief Write instrumentation data to the current file. |
| 12 | * |
| Duncan P. N. Exon Smith | 9edbae0 | 2014-03-20 20:00:44 +0000 | [diff] [blame] | 13 | * Writes to the file with the last name given to \a __llvm_profile_set_filename(), |
| Duncan P. N. Exon Smith | c962cda | 2014-03-20 19:39:01 +0000 | [diff] [blame] | 14 | * or if it hasn't been called, the \c LLVM_PROFILE_FILE environment variable, |
| 15 | * or if that's not set, \c "default.profdata". |
| 16 | */ |
| Duncan P. N. Exon Smith | 9edbae0 | 2014-03-20 20:00:44 +0000 | [diff] [blame] | 17 | void __llvm_profile_write_file(); |
| Duncan P. N. Exon Smith | c962cda | 2014-03-20 19:39:01 +0000 | [diff] [blame] | 18 | |
| 19 | /*! |
| 20 | * \brief Set the filename for writing instrumentation data. |
| 21 | * |
| 22 | * Sets the filename to be used for subsequent calls to |
| Duncan P. N. Exon Smith | 9edbae0 | 2014-03-20 20:00:44 +0000 | [diff] [blame] | 23 | * \a __llvm_profile_write_file(). |
| Duncan P. N. Exon Smith | c962cda | 2014-03-20 19:39:01 +0000 | [diff] [blame] | 24 | */ |
| Duncan P. N. Exon Smith | 9edbae0 | 2014-03-20 20:00:44 +0000 | [diff] [blame] | 25 | void __llvm_profile_set_filename(const char *Name); |
| Duncan P. N. Exon Smith | c962cda | 2014-03-20 19:39:01 +0000 | [diff] [blame] | 26 | |
| 27 | /*! \brief Register to write instrumentation data to file at exit. */ |
| Duncan P. N. Exon Smith | 9edbae0 | 2014-03-20 20:00:44 +0000 | [diff] [blame] | 28 | void __llvm_profile_register_write_file_atexit(); |