* If hashing a pointer, cast it to a 64 bit number so gcc doesn't warn
[oota-llvm.git] / runtime / libtrace / tracelib.h
1 /*===-- Libraries/tracelib.h - Runtime routines for tracing -----*- C++ -*--===
2  *
3  * Runtime routines for supporting tracing of execution
4  * for code generated by LLVM.
5  *
6  *===---------------------------------------------------------------------===*/
7
8 #ifndef _TEST_LIBRARIES_LIBINSTR_TRACELIB_
9 #define _TEST_LIBRARIES_LIBINSTR_TRACELIB_
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 #include <sys/types.h>
16
17 /*===---------------------------------------------------------------------=====
18  * Support for tracing pointers
19  *===---------------------------------------------------------------------===*/
20
21 typedef unsigned int SequenceNumber;
22
23 extern SequenceNumber HashPointerToSeqNum( char* ptr);
24
25 extern void           ReleasePointerSeqNum(char* ptr);
26
27 extern void           RecordPointer(char* ptr);
28
29 extern void           PushPointerSet();
30
31 extern void           ReleasePointersPopSet();
32
33
34 #ifdef __cplusplus
35 }
36 #endif
37
38 /*===---------------------------------------------------------------------===*/
39
40 #endif