xref: /freebsd/contrib/llvm-project/compiler-rt/lib/memprof/memprof_init_version.h (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
1*e8d8bef9SDimitry Andric //===-- memprof_init_version.h ---------------------------------*- C++ -*-===//
2*e8d8bef9SDimitry Andric //
3*e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*e8d8bef9SDimitry Andric //
7*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===//
8*e8d8bef9SDimitry Andric //
9*e8d8bef9SDimitry Andric // This file is a part of MemProfiler, a memory profiler.
10*e8d8bef9SDimitry Andric //
11*e8d8bef9SDimitry Andric // This header defines a versioned __memprof_init function to be called at the
12*e8d8bef9SDimitry Andric // startup of the instrumented program.
13*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===//
14*e8d8bef9SDimitry Andric #ifndef MEMPROF_INIT_VERSION_H
15*e8d8bef9SDimitry Andric #define MEMPROF_INIT_VERSION_H
16*e8d8bef9SDimitry Andric 
17*e8d8bef9SDimitry Andric #include "sanitizer_common/sanitizer_platform.h"
18*e8d8bef9SDimitry Andric 
19*e8d8bef9SDimitry Andric extern "C" {
20*e8d8bef9SDimitry Andric // Every time the Memprof ABI changes we also change the version number in the
21*e8d8bef9SDimitry Andric // __memprof_init function name.  Objects built with incompatible Memprof ABI
22*e8d8bef9SDimitry Andric // versions will not link with run-time.
23*e8d8bef9SDimitry Andric #define __memprof_version_mismatch_check __memprof_version_mismatch_check_v1
24*e8d8bef9SDimitry Andric }
25*e8d8bef9SDimitry Andric 
26*e8d8bef9SDimitry Andric #endif // MEMPROF_INIT_VERSION_H
27