rts: Fix ASSERTs with space before opening paren
[ghc.git] / rts / RtsSymbolInfo.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 2000-2015
4 *
5 * RTS Symbol Info
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #pragma once
10
11 #include "LinkerInternals.h"
12 #include <stdbool.h>
13
14 /* See Note [BFD Import library]. */
15 typedef enum _SymbolKind {
16 KIND_NORMAL = 0x01,
17 KIND_WEAK = 0x02,
18 KIND_IMPORT = 0x04
19 } SymbolKind;
20
21 typedef struct _SymbolInfo {
22 /* Determines what kind of symbol we are storing. */
23 SymbolKind kind;
24 } SymbolInfo;
25
26 bool isSymbolWeak(ObjectCode *owner, const void *label);
27 bool isSymbolImport(ObjectCode *owner, const void *label);
28 void setWeakSymbol(ObjectCode *owner, const void *label);
29 void setImportSymbol(ObjectCode *owner, const void *label);
30 void clearImportSymbol(ObjectCode *owner, const void *label);
31
32 typedef void (*symbolUpdater)(SymbolInfo*);
33 void setSymbolInfo(ObjectCode *owner, const void *label, symbolUpdater updater);