@@ -34,7 +34,8 @@ typedef struct CXInterpreterImpl* CXInterpreter;
34
34
*
35
35
* \returns a \c CXInterpreter.
36
36
*/
37
- CXInterpreter clang_createInterpreter (const char * const * argv , int argc );
37
+ CINDEX_LINKAGE CXInterpreter clang_createInterpreter (const char * const * argv ,
38
+ int argc );
38
39
39
40
typedef void * TInterp_t ;
40
41
@@ -43,27 +44,29 @@ typedef void* TInterp_t;
43
44
*
44
45
* \returns a \c CXInterpreter.
45
46
*/
46
- CXInterpreter clang_createInterpreterFromRawPtr (TInterp_t I );
47
+ CINDEX_LINKAGE CXInterpreter clang_createInterpreterFromRawPtr (TInterp_t I );
47
48
48
49
/**
49
50
* Returns a pointer to the underlying interpreter.
50
51
*/
51
- void * clang_Interpreter_getClangInterpreter (CXInterpreter I );
52
+ CINDEX_LINKAGE void * clang_Interpreter_getClangInterpreter (CXInterpreter I );
52
53
53
54
/**
54
55
* Returns a \c TInterp_t and takes the ownership.
55
56
*/
56
- TInterp_t clang_Interpreter_takeInterpreterAsPtr (CXInterpreter I );
57
+ CINDEX_LINKAGE TInterp_t
58
+ clang_Interpreter_takeInterpreterAsPtr (CXInterpreter I );
57
59
58
60
/**
59
61
* Undo N previous incremental inputs.
60
62
*/
61
- enum CXErrorCode clang_Interpreter_undo (CXInterpreter I , unsigned int N );
63
+ CINDEX_LINKAGE enum CXErrorCode clang_Interpreter_undo (CXInterpreter I ,
64
+ unsigned int N );
62
65
63
66
/**
64
67
* Dispose of the given interpreter context.
65
68
*/
66
- void clang_Interpreter_dispose (CXInterpreter I );
69
+ CINDEX_LINKAGE void clang_Interpreter_dispose (CXInterpreter I );
67
70
68
71
/**
69
72
* Describes the return result of the different routines that do the incremental
@@ -95,8 +98,9 @@ typedef enum {
95
98
*
96
99
* \param prepend Whether to prepend the directory to the search path.
97
100
*/
98
- void clang_Interpreter_addSearchPath (CXInterpreter I , const char * dir ,
99
- bool isUser , bool prepend );
101
+ CINDEX_LINKAGE void clang_Interpreter_addSearchPath (CXInterpreter I ,
102
+ const char * dir ,
103
+ bool isUser , bool prepend );
100
104
101
105
/**
102
106
* Add an include path.
@@ -105,7 +109,8 @@ void clang_Interpreter_addSearchPath(CXInterpreter I, const char* dir,
105
109
*
106
110
* \param dir The directory to add.
107
111
*/
108
- void clang_Interpreter_addIncludePath (CXInterpreter I , const char * dir );
112
+ CINDEX_LINKAGE void clang_Interpreter_addIncludePath (CXInterpreter I ,
113
+ const char * dir );
109
114
110
115
/**
111
116
* Declares a code snippet in \c code and does not execute it.
@@ -118,8 +123,8 @@ void clang_Interpreter_addIncludePath(CXInterpreter I, const char* dir);
118
123
*
119
124
* \returns a \c CXErrorCode.
120
125
*/
121
- enum CXErrorCode clang_Interpreter_declare ( CXInterpreter I , const char * code ,
122
- bool silent );
126
+ CINDEX_LINKAGE enum CXErrorCode
127
+ clang_Interpreter_declare ( CXInterpreter I , const char * code , bool silent );
123
128
124
129
/**
125
130
* Declares and executes a code snippet in \c code.
@@ -130,7 +135,8 @@ enum CXErrorCode clang_Interpreter_declare(CXInterpreter I, const char* code,
130
135
*
131
136
* \returns a \c CXErrorCode.
132
137
*/
133
- enum CXErrorCode clang_Interpreter_process (CXInterpreter I , const char * code );
138
+ CINDEX_LINKAGE enum CXErrorCode clang_Interpreter_process (CXInterpreter I ,
139
+ const char * code );
134
140
135
141
/**
136
142
* An opaque pointer representing a lightweight struct that is used for carrying
@@ -143,14 +149,14 @@ typedef void* CXValue;
143
149
*
144
150
* \returns a \c CXValue.
145
151
*/
146
- CXValue clang_createValue (void );
152
+ CINDEX_LINKAGE CXValue clang_createValue (void );
147
153
148
154
/**
149
155
* Dispose of the given CXValue.
150
156
*
151
157
* \param V The CXValue to dispose.
152
158
*/
153
- void clang_Value_dispose (CXValue V );
159
+ CINDEX_LINKAGE void clang_Value_dispose (CXValue V );
154
160
155
161
/**
156
162
* Declares, executes and stores the execution result to \c V.
@@ -163,8 +169,8 @@ void clang_Value_dispose(CXValue V);
163
169
*
164
170
* \returns a \c CXErrorCode.
165
171
*/
166
- enum CXErrorCode clang_Interpreter_evaluate ( CXInterpreter I , const char * code ,
167
- CXValue V );
172
+ CINDEX_LINKAGE enum CXErrorCode
173
+ clang_Interpreter_evaluate ( CXInterpreter I , const char * code , CXValue V );
168
174
169
175
/**
170
176
* Looks up the library if access is enabled.
@@ -175,7 +181,8 @@ enum CXErrorCode clang_Interpreter_evaluate(CXInterpreter I, const char* code,
175
181
*
176
182
* \returns the path to the library.
177
183
*/
178
- CXString clang_Interpreter_lookupLibrary (CXInterpreter I , const char * lib_name );
184
+ CINDEX_LINKAGE CXString clang_Interpreter_lookupLibrary (CXInterpreter I ,
185
+ const char * lib_name );
179
186
180
187
/**
181
188
* Finds \c lib_stem considering the list of search paths and loads it by
@@ -189,9 +196,8 @@ CXString clang_Interpreter_lookupLibrary(CXInterpreter I, const char* lib_name);
189
196
*
190
197
* \returns a \c CXInterpreter_CompilationResult.
191
198
*/
192
- CXInterpreter_CompilationResult
193
- clang_Interpreter_loadLibrary (CXInterpreter I , const char * lib_stem ,
194
- bool lookup );
199
+ CINDEX_LINKAGE CXInterpreter_CompilationResult clang_Interpreter_loadLibrary (
200
+ CXInterpreter I , const char * lib_stem , bool lookup );
195
201
196
202
/**
197
203
* Finds \c lib_stem considering the list of search paths and unloads it by
@@ -201,7 +207,8 @@ clang_Interpreter_loadLibrary(CXInterpreter I, const char* lib_stem,
201
207
*
202
208
* \param lib_stem The stem of the library to unload.
203
209
*/
204
- void clang_Interpreter_unloadLibrary (CXInterpreter I , const char * lib_stem );
210
+ CINDEX_LINKAGE void clang_Interpreter_unloadLibrary (CXInterpreter I ,
211
+ const char * lib_stem );
205
212
206
213
/**
207
214
* @}
@@ -226,40 +233,41 @@ typedef struct {
226
233
} CXScope ;
227
234
228
235
// for debugging purposes
229
- void clang_scope_dump (CXScope S );
236
+ CINDEX_LINKAGE void clang_scope_dump (CXScope S );
230
237
231
238
/**
232
239
* Checks if a class has a default constructor.
233
240
*/
234
- bool clang_hasDefaultConstructor (CXScope S );
241
+ CINDEX_LINKAGE bool clang_hasDefaultConstructor (CXScope S );
235
242
236
243
/**
237
244
* Returns the default constructor of a class, if any.
238
245
*/
239
- CXScope clang_getDefaultConstructor (CXScope S );
246
+ CINDEX_LINKAGE CXScope clang_getDefaultConstructor (CXScope S );
240
247
241
248
/**
242
249
* Returns the class destructor, if any.
243
250
*/
244
- CXScope clang_getDestructor (CXScope S );
251
+ CINDEX_LINKAGE CXScope clang_getDestructor (CXScope S );
245
252
246
253
/**
247
254
* Returns a stringified version of a given function signature in the form:
248
255
* void N::f(int i, double d, long l = 0, char ch = 'a').
249
256
*/
250
- CXString clang_getFunctionSignature (CXScope func );
257
+ CINDEX_LINKAGE CXString clang_getFunctionSignature (CXScope func );
251
258
252
259
/**
253
260
* Checks if a function is a templated function.
254
261
*/
255
- bool clang_isTemplatedFunction (CXScope func );
262
+ CINDEX_LINKAGE bool clang_isTemplatedFunction (CXScope func );
256
263
257
264
/**
258
265
* This function performs a lookup to check if there is a templated function of
259
266
* that type. \c parent is mandatory, the global scope should be used as the
260
267
* default value.
261
268
*/
262
- bool clang_existsFunctionTemplate (const char * name , CXScope parent );
269
+ CINDEX_LINKAGE bool clang_existsFunctionTemplate (const char * name ,
270
+ CXScope parent );
263
271
264
272
typedef struct {
265
273
void * Type ;
@@ -282,9 +290,8 @@ typedef struct {
282
290
* \returns a \c CXScope representing the instantiated templated
283
291
* class/function/variable.
284
292
*/
285
- CXScope clang_instantiateTemplate (CXScope tmpl ,
286
- CXTemplateArgInfo * template_args ,
287
- size_t template_args_size );
293
+ CINDEX_LINKAGE CXScope clang_instantiateTemplate (
294
+ CXScope tmpl , CXTemplateArgInfo * template_args , size_t template_args_size );
288
295
289
296
/**
290
297
* A fake CXType for working with the interpreter.
@@ -299,12 +306,12 @@ typedef struct {
299
306
/**
300
307
* Gets the string of the type that is passed as a parameter.
301
308
*/
302
- CXString clang_getTypeAsString (CXQualType type );
309
+ CINDEX_LINKAGE CXString clang_getTypeAsString (CXQualType type );
303
310
304
311
/**
305
312
* Returns the complex of the provided type.
306
313
*/
307
- CXQualType clang_getComplexType (CXQualType eltype );
314
+ CINDEX_LINKAGE CXQualType clang_getComplexType (CXQualType eltype );
308
315
309
316
/**
310
317
* An opaque pointer representing the object of a given type (\c CXScope).
@@ -314,18 +321,18 @@ typedef void* CXObject;
314
321
/**
315
322
* Allocates memory for the given type.
316
323
*/
317
- CXObject clang_allocate (unsigned int n );
324
+ CINDEX_LINKAGE CXObject clang_allocate (unsigned int n );
318
325
319
326
/**
320
327
* Deallocates memory for a given class.
321
328
*/
322
- void clang_deallocate (CXObject address );
329
+ CINDEX_LINKAGE void clang_deallocate (CXObject address );
323
330
324
331
/**
325
332
* Creates an object of class \c scope and calls its default constructor. If \c
326
333
* arena is set it uses placement new.
327
334
*/
328
- CXObject clang_construct (CXScope scope , void * arena );
335
+ CINDEX_LINKAGE CXObject clang_construct (CXScope scope , void * arena );
329
336
330
337
/**
331
338
* Creates a trampoline function and makes a call to a generic function or
@@ -341,8 +348,8 @@ CXObject clang_construct(CXScope scope, void* arena);
341
348
*
342
349
* \param self The 'this pointer' of the object.
343
350
*/
344
- void clang_invoke (CXScope func , void * result , void * * args , size_t n ,
345
- void * self );
351
+ CINDEX_LINKAGE void clang_invoke (CXScope func , void * result , void * * args ,
352
+ size_t n , void * self );
346
353
347
354
/**
348
355
* Calls the destructor of object of type \c type. When withFree is true it
@@ -354,7 +361,7 @@ void clang_invoke(CXScope func, void* result, void** args, size_t n,
354
361
*
355
362
* \param withFree Whether to call operator delete/free or not.
356
363
*/
357
- void clang_destruct (CXObject This , CXScope S , bool withFree );
364
+ CINDEX_LINKAGE void clang_destruct (CXObject This , CXScope S , bool withFree );
358
365
359
366
/**
360
367
* @}
0 commit comments