2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
17 * Ideally, this macro would check if size bytes could be read at
18 * pointer p. No generic solution.
20 #define POINTER_READ(p, size) (p)
22 /* returns the kind of the thing */
23 firm_kind get_kind(const void *firm_thing)
25 return POINTER_READ(firm_thing, sizeof(firm_kind)) ? *(firm_kind *)firm_thing : k_BAD;