From: Michael Beck Date: Wed, 17 Nov 2010 23:17:02 +0000 (+0000) Subject: Put definition of get_base_sc() into .c file to remove the (non-standard) inline... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=20cad1eeaf5dbfa9597aa058826ae919a02d124a;p=libfirm Put definition of get_base_sc() into .c file to remove the (non-standard) inline specifier from official header. Most users of this function are inside teh same c file, so the performance hit is small. [r28144] --- diff --git a/include/libfirm/irmemory.h b/include/libfirm/irmemory.h index 32521443f..948c04063 100644 --- a/include/libfirm/irmemory.h +++ b/include/libfirm/irmemory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2010 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -76,10 +76,7 @@ typedef enum ir_storage_class_class_t { ENUM_BITSET(ir_storage_class_class_t) /** Get the base storage class (ignore modifier) */ -static inline ir_storage_class_class_t get_base_sc(ir_storage_class_class_t x) -{ - return x & ~ir_sc_modifiers; -} +FIRM_API ir_storage_class_class_t get_base_sc(ir_storage_class_class_t x); /** * A source language specific memory disambiguator function. diff --git a/ir/ana/irmemory.c b/ir/ana/irmemory.c index d9b7a58c2..b0554d1cc 100644 --- a/ir/ana/irmemory.c +++ b/ir/ana/irmemory.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2010 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -91,6 +91,12 @@ void set_irp_memory_disambiguator_options(unsigned options) global_mem_disamgig_opt = options; } /* set_irp_memory_disambiguator_options */ +/* Get the base storage class (ignore modifier) */ +ir_storage_class_class_t get_base_sc(ir_storage_class_class_t x) +{ + return x & ~ir_sc_modifiers; +} /* get_base_sc */ + /** * Find the base address and entity of an Sel node. *