#if defined(__linux__) || defined(__FreeBSD__) || defined(__Fuchsia__) || \
(defined(__sun__) && defined(__svr4__)) || defined(__NetBSD__) || \
defined(_AIX)
#if !defined(_AIX)
#include <elf.h>
#include <link.h>
#endif
#include <stdlib.h>
#include <string.h>
#include "InstrProfiling.h"
#include "InstrProfilingInternal.h"
#define PROF_DATA_START …
#define PROF_DATA_STOP …
#define PROF_NAME_START …
#define PROF_NAME_STOP …
#define PROF_VNAME_START …
#define PROF_VNAME_STOP …
#define PROF_CNTS_START …
#define PROF_CNTS_STOP …
#define PROF_VTABLE_START …
#define PROF_VTABLE_STOP …
#define PROF_BITS_START …
#define PROF_BITS_STOP …
#define PROF_ORDERFILE_START …
#define PROF_VNODES_START …
#define PROF_VNODES_STOP …
extern __llvm_profile_data PROF_DATA_START COMPILER_RT_VISIBILITY
COMPILER_RT_WEAK;
extern __llvm_profile_data PROF_DATA_STOP COMPILER_RT_VISIBILITY
COMPILER_RT_WEAK;
extern char PROF_CNTS_START COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern char PROF_CNTS_STOP COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern VTableProfData PROF_VTABLE_START COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern VTableProfData PROF_VTABLE_STOP COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern char PROF_VNAME_START COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern char PROF_VNAME_STOP COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern char PROF_BITS_START COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern char PROF_BITS_STOP COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern uint32_t PROF_ORDERFILE_START COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern char PROF_NAME_START COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern char PROF_NAME_STOP COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern ValueProfNode PROF_VNODES_START COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
extern ValueProfNode PROF_VNODES_STOP COMPILER_RT_VISIBILITY COMPILER_RT_WEAK;
COMPILER_RT_VISIBILITY const __llvm_profile_data *
__llvm_profile_begin_data(void) { … }
COMPILER_RT_VISIBILITY const __llvm_profile_data *
__llvm_profile_end_data(void) { … }
COMPILER_RT_VISIBILITY const char *__llvm_profile_begin_names(void) { … }
COMPILER_RT_VISIBILITY const char *__llvm_profile_end_names(void) { … }
COMPILER_RT_VISIBILITY const char *__llvm_profile_begin_vtabnames(void) { … }
COMPILER_RT_VISIBILITY const char *__llvm_profile_end_vtabnames(void) { … }
COMPILER_RT_VISIBILITY const VTableProfData *
__llvm_profile_begin_vtables(void) { … }
COMPILER_RT_VISIBILITY const VTableProfData *__llvm_profile_end_vtables(void) { … }
COMPILER_RT_VISIBILITY char *__llvm_profile_begin_counters(void) { … }
COMPILER_RT_VISIBILITY char *__llvm_profile_end_counters(void) { … }
COMPILER_RT_VISIBILITY char *__llvm_profile_begin_bitmap(void) { … }
COMPILER_RT_VISIBILITY char *__llvm_profile_end_bitmap(void) { … }
COMPILER_RT_VISIBILITY uint32_t *__llvm_profile_begin_orderfile(void) { … }
COMPILER_RT_VISIBILITY ValueProfNode *
__llvm_profile_begin_vnodes(void) { … }
COMPILER_RT_VISIBILITY ValueProfNode *__llvm_profile_end_vnodes(void) { … }
COMPILER_RT_VISIBILITY ValueProfNode *CurrentVNode = …;
COMPILER_RT_VISIBILITY ValueProfNode *EndVNode = …;
#ifdef NT_GNU_BUILD_ID
static size_t RoundUp(size_t size, size_t align) { … }
static int WriteBinaryIdForNote(ProfDataWriter *Writer,
const ElfW(Nhdr) * Note) { … }
static int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note,
const ElfW(Nhdr) * NotesEnd) { … }
COMPILER_RT_VISIBILITY int __llvm_write_binary_ids(ProfDataWriter *Writer) { … }
#elif !defined(_AIX)
COMPILER_RT_VISIBILITY int __llvm_write_binary_ids(ProfDataWriter *Writer) {
return 0;
}
#endif
#endif