Make show_symbol newline-consistent
[smatch.git] / target.h
blob7f0fd27e1fa80c35ee2c2fa413d9984c375b4a95
1 #ifndef TARGET_H
2 #define TARGET_H
4 extern struct symbol *size_t_ctype;
5 extern struct symbol *ssize_t_ctype;
7 /*
8 * For "__attribute__((aligned))"
9 */
10 extern int max_alignment;
13 * Integer data types
15 extern int bits_in_bool;
16 extern int bits_in_char;
17 extern int bits_in_short;
18 extern int bits_in_int;
19 extern int bits_in_long;
20 extern int bits_in_longlong;
22 extern int max_int_alignment;
25 * Floating point data types
27 extern int bits_in_float;
28 extern int bits_in_double;
29 extern int bits_in_longdouble;
31 extern int max_fp_alignment;
34 * Pointer data type
36 extern int bits_in_pointer;
37 extern int pointer_alignment;
40 * Enum data types
42 extern int bits_in_enum;
43 extern int enum_alignment;
46 * Helper functions for converting bits to bytes and vice versa.
49 static inline int bits_to_bytes(int bits)
51 return bits >= 0 ? bits / bits_in_char : -1;
54 static inline int bytes_to_bits(int bytes)
56 return bytes * bits_in_char;
59 #endif