blob: 12eddf0f90f8ec4412f80c96dd06c6fe5e6003ca [file] [log] [blame]
Duncan P. N. Exon Smithc962cda2014-03-20 19:39:01 +00001/*===- 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 Smith9edbae02014-03-20 20:00:44 +000013 * Writes to the file with the last name given to \a __llvm_profile_set_filename(),
Duncan P. N. Exon Smithc962cda2014-03-20 19:39:01 +000014 * 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 Smith9edbae02014-03-20 20:00:44 +000017void __llvm_profile_write_file();
Duncan P. N. Exon Smithc962cda2014-03-20 19:39:01 +000018
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 Smith9edbae02014-03-20 20:00:44 +000023 * \a __llvm_profile_write_file().
Duncan P. N. Exon Smithc962cda2014-03-20 19:39:01 +000024 */
Duncan P. N. Exon Smith9edbae02014-03-20 20:00:44 +000025void __llvm_profile_set_filename(const char *Name);
Duncan P. N. Exon Smithc962cda2014-03-20 19:39:01 +000026
27/*! \brief Register to write instrumentation data to file at exit. */
Duncan P. N. Exon Smith9edbae02014-03-20 20:00:44 +000028void __llvm_profile_register_write_file_atexit();