Commit c021732d authored by Matthias Braun's avatar Matthias Braun
Browse files

properly mark symbols in the public API to be exported. This allows us to use...

properly mark symbols in the public API to be exported. This allows us to use -fvisibility=hidden on ELF systems and dllexport on windows

[r27564]
parent 80fce604
......@@ -2,11 +2,13 @@ libfirmincludedir=$(includedir)/libfirm
libfirminclude_HEADERS = \
analyze_irg_args.h \
be.h \
begin.h \
callgraph.h \
cdep.h \
cgana.h \
compound_path.h \
dbginfo.h \
end.h \
execfreq.h \
execution_frequency.h \
field_temperature.h \
......@@ -49,7 +51,6 @@ libfirminclude_HEADERS = \
irtypeinfo.h \
irvrfy.h \
lowering.h \
old_fctnames.h \
pseudo_irg.h \
rta.h \
seqnumbers.h \
......@@ -62,7 +63,6 @@ libfirminclude_HEADERS = \
libfirminclude_adtdir=$(includedir)/libfirm/adt
libfirminclude_adt_HEADERS = \
adt/align.h \
adt/array.h \
adt/bipartite.h \
adt/cpset.h \
......@@ -73,12 +73,10 @@ libfirminclude_adt_HEADERS = \
adt/hashptr.h \
adt/hashset.h \
adt/hungarian.h \
adt/impl.h \
adt/iterator.h \
adt/list.h \
adt/obstack.h \
adt/obst.h \
adt/offset.h \
adt/pdeq.h \
adt/plist.h \
adt/pmap.h \
......@@ -87,5 +85,4 @@ libfirminclude_adt_HEADERS = \
adt/pset_new.h \
adt/set.h \
adt/unionfind.h \
adt/util.h \
adt/xmalloc.h
......@@ -33,6 +33,8 @@
#include "fourcc.h"
#include "xmalloc.h"
#include "../begin.h"
/**
* Creates a flexible array.
*
......@@ -366,4 +368,6 @@ do { \
*/
#define ARR_SET_CLEAR(arr) ARR_SHRINKLEN(arr, 0)
#endif /* FIRM_ADT_ARRAY_H */
#include "../end.h"
#endif
......@@ -26,6 +26,8 @@
#ifndef FIRM_ADT_BIPARTITE_H
#define FIRM_ADT_BIPARTITE_H
#include "../begin.h"
typedef struct _bipartite_t bipartite_t;
bipartite_t *bipartite_new(int n_left, int n_right);
......@@ -45,4 +47,6 @@ void bipartite_dump_f(FILE *f, const bipartite_t *gr);
*/
void bipartite_dump(const char *name, const bipartite_t *gr);
#include "../end.h"
#endif /* _BIPARTITE_H */
......@@ -27,6 +27,8 @@
#ifndef FIRM_ADT_CPSET_H
#define FIRM_ADT_CPSET_H
#include "../begin.h"
/**
* The type of a cpset compare function.
*
......@@ -150,4 +152,6 @@ void *cpset_iterator_next(cpset_iterator_t *iterator);
*/
void cpset_remove_iterator(cpset_t *cpset, const cpset_iterator_t *iterator);
#endif /* FIRM_ADT_CPSET_H */
#include "../end.h"
#endif
......@@ -28,6 +28,8 @@
#ifndef FIRM_ADT_ESET_H
#define FIRM_ADT_ESET_H
#include "../begin.h"
/**
* "eset" is a set of addresses. The addresses are used for element
* compare and hash calculation.
......@@ -73,4 +75,6 @@ void *eset_next(eset *s);
/** Inserts all elements of source into target (union). Does NOT work if NULL is contained in source. */
void eset_insert_all(eset *target, eset *source);
#include "../end.h"
#endif
......@@ -5,6 +5,8 @@
#ifndef FIRM_ADT_GAUSSJORDAN_H
#define FIRM_ADT_GAUSSJORDAN_H
#include "../begin.h"
/**
* solves a system of linear equations and returns 0 if successful
*
......@@ -14,4 +16,6 @@
*/
int firm_gaussjordansolve(double *A, double *b, int nsize);
#include "../end.h"
#endif
......@@ -3,6 +3,8 @@
#include <stdio.h>
#include "../begin.h"
typedef struct _gs_matrix_t gs_matrix_t;
/**
......@@ -53,4 +55,6 @@ int gs_matrix_get_sizeof_allocated_memory(const gs_matrix_t *m);
void gs_matrix_export(const gs_matrix_t *m, double *nw, int size);
#endif /*MATRIX_H_*/
#include "../end.h"
#endif
......@@ -26,6 +26,8 @@
#ifndef FIRM_ADT_HASHPTR_H
#define FIRM_ADT_HASHPTR_H
#include "../begin.h"
#define _FIRM_FNV_OFFSET_BASIS 2166136261U
#define _FIRM_FNV_FNV_PRIME 16777619U
......@@ -102,4 +104,6 @@ static inline unsigned _hash_combine(unsigned x, unsigned y)
*/
#define HASH_COMBINE(a,b) _hash_combine(a, b)
#include "../end.h"
#endif
......@@ -33,6 +33,8 @@
#ifndef FIRM_ADT_HUNGARIAN_H
#define FIRM_ADT_HUNGARIAN_H
#include "../begin.h"
#define HUNGARIAN_MODE_MINIMIZE_COST 0
#define HUNGARIAN_MODE_MAXIMIZE_UTIL 1
......@@ -94,4 +96,6 @@ int hungarian_solve(hungarian_problem_t *p, int *assignment, int *final_cost, in
*/
void hungarian_print_cost_matrix(hungarian_problem_t *p, int cost_width);
#endif /* _HUNGARIAN_H_ */
#include "../end.h"
#endif
......@@ -30,6 +30,8 @@
#include "fourcc.h"
#include "../begin.h"
/**
* The iterator magic word.
*/
......@@ -59,4 +61,6 @@ extern const iterator_t *list_iterator;
*/
extern const iterator_t *pset_iterator;
#include "../end.h"
#endif
......@@ -16,6 +16,8 @@
#include <stdlib.h>
#include "../begin.h"
typedef struct list_head list_head;
struct list_head {
struct list_head *next, *prev;
......@@ -277,5 +279,6 @@ static inline void list_splice_init(struct list_head *list,
&pos->member != (head); \
pos = n, n = list_entry(n->member.next, type, member))
#include "../end.h"
#endif
......@@ -106,10 +106,8 @@ Summary:
#ifndef _OBSTACK_H
#define _OBSTACK_H 1
#ifdef __cplusplus
extern "C" {
#endif
#include "../begin.h"
/* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is
defined, as with GNU C, use that; that way we don't pollute the
namespace with <stddef.h>'s symbols. Otherwise, include <stddef.h>
......@@ -506,8 +504,6 @@ __extension__ \
int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap);
int obstack_printf(struct obstack *obst, const char *fmt, ...);
#ifdef __cplusplus
} /* C++ */
#endif
#include "../end.h"
#endif /* obstack.h */
......@@ -26,6 +26,8 @@
#ifndef FIRM_ADT_PDEQ_H
#define FIRM_ADT_PDEQ_H
#include "../begin.h"
/**
* The type of the pointer compare function.
*
......@@ -268,4 +270,6 @@ typedef pdeq stack;
*/
#define stack_empty(st) pdeq_empty(wq)
#include "../end.h"
#endif
......@@ -37,6 +37,8 @@
#include <stddef.h>
#include "obst.h"
#include "../begin.h"
typedef struct _plist_element plist_element_t;
typedef struct _plist plist_t;
......@@ -243,4 +245,6 @@ void plist_clear(plist_t *list);
#define foreach_plist(list, el) \
for (el = plist_first(list); el; el = plist_element_get_next(el))
#endif /*_PLIST_H_*/
#include "../end.h"
#endif
......@@ -27,6 +27,8 @@
#ifndef FIRM_ADT_PMAP_H
#define FIRM_ADT_PMAP_H
#include "../begin.h"
/** A map which maps addresses to addresses. */
typedef struct pmap pmap;
......@@ -83,4 +85,6 @@ pmap_entry *pmap_next(pmap *);
*/
void pmap_break(pmap *map);
#include "../end.h"
#endif
......@@ -28,6 +28,8 @@
#ifndef FIRM_ADT_PQUEUE_H
#define FIRM_ADT_PQUEUE_H
#include "../begin.h"
typedef struct _pqueue_t pqueue_t;
/**
......@@ -71,4 +73,6 @@ int pqueue_length(const pqueue_t *q);
*/
int pqueue_empty(const pqueue_t *q);
#include "../end.h"
#endif
......@@ -34,6 +34,8 @@
#include "hashptr.h"
#include "iterator.h"
#include "../begin.h"
/**
* The default comparison function for pointers.
* @param x A pointer.
......@@ -269,4 +271,6 @@ extern const char *pset_tag;
# define PSET_TRACE
#endif /* !(DEBUG && HAVE_GNU_MALLOC) */
#include "../end.h"
#endif
......@@ -32,6 +32,8 @@
#ifndef FIRM_ADT_PSET_NEW_H
#define FIRM_ADT_PSET_NEW_H
#include "../begin.h"
#define HashSet pset_new_t
#define HashSetIterator pset_new_iterator_t
#define ValueType void*
......@@ -139,4 +141,6 @@ void pset_new_remove_iterator(pset_new_t *pset_new, const pset_new_iterator_t *i
ptr = pset_new_iterator_next(&iter); \
ptr != NULL; ptr = pset_new_iterator_next(&iter))
#include "../end.h"
#endif
......@@ -28,6 +28,8 @@
#include <stddef.h>
#include "../begin.h"
/**
* The abstract type of a set.
*
......@@ -242,4 +244,6 @@ extern const char *set_tag;
# define SET_TRACE
#endif /* !(DEBUG && HAVE_GNU_MALLOC) */
#include "../end.h"
#endif
......@@ -33,6 +33,8 @@
#include <assert.h>
#include "../begin.h"
/**
* Call this to initialize an array of @p count elements to be used by the
* union find functions.
......@@ -111,4 +113,6 @@ static inline int uf_find(int* data, int e)
return repr;
}
#include "../end.h"
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment