LLVM  14.0.0git
Orc.h
Go to the documentation of this file.
1 /*===---------------- llvm-c/Orc.h - OrcV2 C bindings -----------*- C++ -*-===*\
2 |* *|
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4 |* Exceptions. *|
5 |* See https://llvm.org/LICENSE.txt for license information. *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
7 |* *|
8 |*===----------------------------------------------------------------------===*|
9 |* *|
10 |* This header declares the C interface to libLLVMOrcJIT.a, which implements *|
11 |* JIT compilation of LLVM IR. Minimal documentation of C API specific issues *|
12 |* (especially memory ownership rules) is provided. Core Orc concepts are *|
13 |* documented in llvm/docs/ORCv2.rst and APIs are documented in the C++ *|
14 |* headers *|
15 |* *|
16 |* Many exotic languages can interoperate with C code but have a harder time *|
17 |* with C++ due to name mangling. So in addition to C, this interface enables *|
18 |* tools written in such languages. *|
19 |* *|
20 |* Note: This interface is experimental. It is *NOT* stable, and may be *|
21 |* changed without warning. Only C API usage documentation is *|
22 |* provided. See the C++ documentation for all higher level ORC API *|
23 |* details. *|
24 |* *|
25 \*===----------------------------------------------------------------------===*/
26 
27 #ifndef LLVM_C_ORC_H
28 #define LLVM_C_ORC_H
29 
30 #include "llvm-c/Error.h"
31 #include "llvm-c/TargetMachine.h"
32 #include "llvm-c/Types.h"
33 
35 
36 /**
37  * Represents an address in the executor process.
38  */
40 
41 /**
42  * Represents an address in the executor process.
43  */
45 
46 /**
47  * Represents generic linkage flags for a symbol definition.
48  */
49 typedef enum {
55 
56 /**
57  * Represents target specific flags for a symbol definition.
58  */
59 typedef uint8_t LLVMJITSymbolTargetFlags;
60 
61 /**
62  * Represents the linkage flags for a symbol definition.
63  */
64 typedef struct {
65  uint8_t GenericFlags;
66  uint8_t TargetFlags;
68 
69 /**
70  * Represents an evaluated symbol address and flags.
71  */
72 typedef struct {
76 
77 /**
78  * A reference to an orc::ExecutionSession instance.
79  */
80 typedef struct LLVMOrcOpaqueExecutionSession *LLVMOrcExecutionSessionRef;
81 
82 /**
83  * Error reporter function.
84  */
85 typedef void (*LLVMOrcErrorReporterFunction)(void *Ctx, LLVMErrorRef Err);
86 
87 /**
88  * A reference to an orc::SymbolStringPool.
89  */
90 typedef struct LLVMOrcOpaqueSymbolStringPool *LLVMOrcSymbolStringPoolRef;
91 
92 /**
93  * A reference to an orc::SymbolStringPool table entry.
94  */
95 typedef struct LLVMOrcOpaqueSymbolStringPoolEntry
97 
98 /**
99  * Represents a pair of a symbol name and LLVMJITSymbolFlags.
100  */
101 typedef struct {
105 
106 /**
107  * Represents a list of (SymbolStringPtr, JITSymbolFlags) pairs that can be used
108  * to construct a SymbolFlagsMap.
109  */
111 
112 /**
113  * Represents a pair of a symbol name and an evaluated symbol.
114  */
115 typedef struct {
119 
120 /**
121  * Represents a list of (SymbolStringPtr, JITEvaluatedSymbol) pairs that can be
122  * used to construct a SymbolMap.
123  */
125 
126 /**
127  * Represents a SymbolAliasMapEntry
128  */
129 typedef struct {
133 
134 /**
135  * Represents a pair of a symbol name and SymbolAliasMapEntry.
136  */
137 typedef struct {
141 
142 /**
143  * Represents a list of (SymbolStringPtr, (SymbolStringPtr, JITSymbolFlags))
144  * pairs that can be used to construct a SymbolFlagsMap.
145  */
147 
148 /**
149  * A reference to an orc::JITDylib instance.
150  */
151 typedef struct LLVMOrcOpaqueJITDylib *LLVMOrcJITDylibRef;
152 
153 /**
154  * Represents a list of LLVMOrcSymbolStringPoolEntryRef and the associated
155  * length.
156  */
157 typedef struct {
159  size_t Length;
161 
162 /**
163  * Represents a pair of a JITDylib and LLVMOrcCSymbolsList.
164  */
165 typedef struct {
169 
170 /**
171  * Represents a list of (JITDylibRef, (LLVMOrcSymbolStringPoolEntryRef*,
172  * size_t)) pairs that can be used to construct a SymbolDependenceMap.
173  */
175 
176 /**
177  * Lookup kind. This can be used by definition generators when deciding whether
178  * to produce a definition for a requested symbol.
179  *
180  * This enum should be kept in sync with llvm::orc::LookupKind.
181  */
182 typedef enum {
186 
187 /**
188  * JITDylib lookup flags. This can be used by definition generators when
189  * deciding whether to produce a definition for a requested symbol.
190  *
191  * This enum should be kept in sync with llvm::orc::JITDylibLookupFlags.
192  */
193 typedef enum {
197 
198 /**
199  * Symbol lookup flags for lookup sets. This should be kept in sync with
200  * llvm::orc::SymbolLookupFlags.
201  */
202 typedef enum {
206 
207 /**
208  * An element type for a symbol lookup set.
209  */
210 typedef struct {
214 
215 /**
216  * A set of symbols to look up / generate.
217  *
218  * The list is terminated with an element containing a null pointer for the
219  * Name field.
220  *
221  * If a client creates an instance of this type then they are responsible for
222  * freeing it, and for ensuring that all strings have been retained over the
223  * course of its life. Clients receiving a copy from a callback are not
224  * responsible for managing lifetime or retain counts.
225  */
227 
228 /**
229  * A reference to a uniquely owned orc::MaterializationUnit instance.
230  */
231 typedef struct LLVMOrcOpaqueMaterializationUnit *LLVMOrcMaterializationUnitRef;
232 
233 /**
234  * A reference to a uniquely owned orc::MaterializationResponsibility instance.
235  *
236  * Ownership must be passed to a lower-level layer in a JIT stack.
237  */
238 typedef struct LLVMOrcOpaqueMaterializationResponsibility
240 
241 /**
242  * A MaterializationUnit materialize callback.
243  *
244  * Ownership of the Ctx and MR arguments passes to the callback which must
245  * adhere to the LLVMOrcMaterializationResponsibilityRef contract (see comment
246  * for that type).
247  *
248  * If this callback is called then the LLVMOrcMaterializationUnitDestroy
249  * callback will NOT be called.
250  */
253 
254 /**
255  * A MaterializationUnit discard callback.
256  *
257  * Ownership of JD and Symbol remain with the caller: These arguments should
258  * not be disposed of or released.
259  */
262 
263 /**
264  * A MaterializationUnit destruction callback.
265  *
266  * If a custom MaterializationUnit is destroyed before its Materialize
267  * function is called then this function will be called to provide an
268  * opportunity for the underlying program representation to be destroyed.
269  */
270 typedef void (*LLVMOrcMaterializationUnitDestroyFunction)(void *Ctx);
271 
272 /**
273  * A reference to an orc::ResourceTracker instance.
274  */
275 typedef struct LLVMOrcOpaqueResourceTracker *LLVMOrcResourceTrackerRef;
276 
277 /**
278  * A reference to an orc::DefinitionGenerator.
279  */
280 typedef struct LLVMOrcOpaqueDefinitionGenerator
282 
283 /**
284  * An opaque lookup state object. Instances of this type can be captured to
285  * suspend a lookup while a custom generator function attempts to produce a
286  * definition.
287  *
288  * If a client captures a lookup state object then they must eventually call
289  * LLVMOrcLookupStateContinueLookup to restart the lookup. This is required
290  * in order to release memory allocated for the lookup state, even if errors
291  * have occurred while the lookup was suspended (if these errors have made the
292  * lookup impossible to complete then it will issue its own error before
293  * destruction).
294  */
295 typedef struct LLVMOrcOpaqueLookupState *LLVMOrcLookupStateRef;
296 
297 /**
298  * A custom generator function. This can be used to create a custom generator
299  * object using LLVMOrcCreateCustomCAPIDefinitionGenerator. The resulting
300  * object can be attached to a JITDylib, via LLVMOrcJITDylibAddGenerator, to
301  * receive callbacks when lookups fail to match existing definitions.
302  *
303  * GeneratorObj will contain the address of the custom generator object.
304  *
305  * Ctx will contain the context object passed to
306  * LLVMOrcCreateCustomCAPIDefinitionGenerator.
307  *
308  * LookupState will contain a pointer to an LLVMOrcLookupStateRef object. This
309  * can optionally be modified to make the definition generation process
310  * asynchronous: If the LookupStateRef value is copied, and the original
311  * LLVMOrcLookupStateRef set to null, the lookup will be suspended. Once the
312  * asynchronous definition process has been completed clients must call
313  * LLVMOrcLookupStateContinueLookup to continue the lookup (this should be
314  * done unconditionally, even if errors have occurred in the mean time, to
315  * free the lookup state memory and notify the query object of the failures).
316  * If LookupState is captured this function must return LLVMErrorSuccess.
317  *
318  * The Kind argument can be inspected to determine the lookup kind (e.g.
319  * as-if-during-static-link, or as-if-during-dlsym).
320  *
321  * The JD argument specifies which JITDylib the definitions should be generated
322  * into.
323  *
324  * The JDLookupFlags argument can be inspected to determine whether the original
325  * lookup included non-exported symobls.
326  *
327  * Finally, the LookupSet argument contains the set of symbols that could not
328  * be found in JD already (the set of generation candidates).
329  */
331  LLVMOrcDefinitionGeneratorRef GeneratorObj, void *Ctx,
334  LLVMOrcCLookupSet LookupSet, size_t LookupSetSize);
335 
336 /**
337  * Predicate function for SymbolStringPoolEntries.
338  */
339 typedef int (*LLVMOrcSymbolPredicate)(void *Ctx,
341 
342 /**
343  * A reference to an orc::ThreadSafeContext instance.
344  */
345 typedef struct LLVMOrcOpaqueThreadSafeContext *LLVMOrcThreadSafeContextRef;
346 
347 /**
348  * A reference to an orc::ThreadSafeModule instance.
349  */
350 typedef struct LLVMOrcOpaqueThreadSafeModule *LLVMOrcThreadSafeModuleRef;
351 
352 /**
353  * A function for inspecting/mutating IR modules, suitable for use with
354  * LLVMOrcThreadSafeModuleWithModuleDo.
355  */
357  void *Ctx, LLVMModuleRef M);
358 
359 /**
360  * A reference to an orc::JITTargetMachineBuilder instance.
361  */
362 typedef struct LLVMOrcOpaqueJITTargetMachineBuilder
364 
365 /**
366  * A reference to an orc::ObjectLayer instance.
367  */
368 typedef struct LLVMOrcOpaqueObjectLayer *LLVMOrcObjectLayerRef;
369 
370 /**
371  * A reference to an orc::ObjectLinkingLayer instance.
372  */
373 typedef struct LLVMOrcOpaqueObjectLinkingLayer *LLVMOrcObjectLinkingLayerRef;
374 
375 /**
376  * A reference to an orc::IRTransformLayer instance.
377  */
378 typedef struct LLVMOrcOpaqueIRTransformLayer *LLVMOrcIRTransformLayerRef;
379 
380 /**
381  * A function for applying transformations as part of an transform layer.
382  *
383  * Implementations of this type are responsible for managing the lifetime
384  * of the Module pointed to by ModInOut: If the LLVMModuleRef value is
385  * overwritten then the function is responsible for disposing of the incoming
386  * module. If the module is simply accessed/mutated in-place then ownership
387  * returns to the caller and the function does not need to do any lifetime
388  * management.
389  *
390  * Clients can call LLVMOrcLLJITGetIRTransformLayer to obtain the transform
391  * layer of a LLJIT instance, and use LLVMOrcIRTransformLayerSetTransform
392  * to set the function. This can be used to override the default transform
393  * layer.
394  */
396  void *Ctx, LLVMOrcThreadSafeModuleRef *ModInOut,
398 
399 /**
400  * A reference to an orc::ObjectTransformLayer instance.
401  */
402 typedef struct LLVMOrcOpaqueObjectTransformLayer
404 
405 /**
406  * A function for applying transformations to an object file buffer.
407  *
408  * Implementations of this type are responsible for managing the lifetime
409  * of the memory buffer pointed to by ObjInOut: If the LLVMMemoryBufferRef
410  * value is overwritten then the function is responsible for disposing of the
411  * incoming buffer. If the buffer is simply accessed/mutated in-place then
412  * ownership returns to the caller and the function does not need to do any
413  * lifetime management.
414  *
415  * The transform is allowed to return an error, in which case the ObjInOut
416  * buffer should be disposed of and set to null.
417  */
419  void *Ctx, LLVMMemoryBufferRef *ObjInOut);
420 
421 /**
422  * A reference to an orc::IndirectStubsManager instance.
423  */
424 typedef struct LLVMOrcOpaqueIndirectStubsManager
426 
427 /**
428  * A reference to an orc::LazyCallThroughManager instance.
429  */
430 typedef struct LLVMOrcOpaqueLazyCallThroughManager
432 
433 /**
434  * A reference to an orc::DumpObjects object.
435  *
436  * Can be used to dump object files to disk with unique names. Useful as an
437  * ObjectTransformLayer transform.
438  */
439 typedef struct LLVMOrcOpaqueDumpObjects *LLVMOrcDumpObjectsRef;
440 
441 /**
442  * Attach a custom error reporter function to the ExecutionSession.
443  *
444  * The error reporter will be called to deliver failure notices that can not be
445  * directly reported to a caller. For example, failure to resolve symbols in
446  * the JIT linker is typically reported via the error reporter (callers
447  * requesting definitions from the JIT will typically be delivered a
448  * FailureToMaterialize error instead).
449  */
452  void *Ctx);
453 
454 /**
455  * Return a reference to the SymbolStringPool for an ExecutionSession.
456  *
457  * Ownership of the pool remains with the ExecutionSession: The caller is
458  * not required to free the pool.
459  */
462 
463 /**
464  * Clear all unreferenced symbol string pool entries.
465  *
466  * This can be called at any time to release unused entries in the
467  * ExecutionSession's string pool. Since it locks the pool (preventing
468  * interning of any new strings) it is recommended that it only be called
469  * infrequently, ideally when the caller has reason to believe that some
470  * entries will have become unreferenced, e.g. after removing a module or
471  * closing a JITDylib.
472  */
474 
475 /**
476  * Intern a string in the ExecutionSession's SymbolStringPool and return a
477  * reference to it. This increments the ref-count of the pool entry, and the
478  * returned value should be released once the client is done with it by
479  * calling LLVMOrReleaseSymbolStringPoolEntry.
480  *
481  * Since strings are uniqued within the SymbolStringPool
482  * LLVMOrcSymbolStringPoolEntryRefs can be compared by value to test string
483  * equality.
484  *
485  * Note that this function does not perform linker-mangling on the string.
486  */
489 
490 /**
491  * Increments the ref-count for a SymbolStringPool entry.
492  */
494 
495 /**
496  * Reduces the ref-count for of a SymbolStringPool entry.
497  */
499 
501 
502 /**
503  * Reduces the ref-count of a ResourceTracker.
504  */
506 
507 /**
508  * Transfers tracking of all resources associated with resource tracker SrcRT
509  * to resource tracker DstRT.
510  */
513 
514 /**
515  * Remove all resources associated with the given tracker. See
516  * ResourceTracker::remove().
517  */
519 
520 /**
521  * Dispose of a JITDylib::DefinitionGenerator. This should only be called if
522  * ownership has not been passed to a JITDylib (e.g. because some error
523  * prevented the client from calling LLVMOrcJITDylibAddGenerator).
524  */
526 
527 /**
528  * Dispose of a MaterializationUnit.
529  */
531 
532 /**
533  * Create a custom MaterializationUnit.
534  *
535  * Name is a name for this MaterializationUnit to be used for identification
536  * and logging purposes (e.g. if this MaterializationUnit produces an
537  * object buffer then the name of that buffer will be derived from this name).
538  *
539  * The Syms list contains the names and linkages of the symbols provided by this
540  * unit. This function takes ownership of the elements of the Syms array. The
541  * Name fields of the array elements are taken to have been retained for this
542  * function. The client should *not* release the elements of the array, but is
543  * still responsible for destroyingthe array itself.
544  *
545  * The InitSym argument indicates whether or not this MaterializationUnit
546  * contains static initializers. If three are no static initializers (the common
547  * case) then this argument should be null. If there are static initializers
548  * then InitSym should be set to a unique name that also appears in the Syms
549  * list with the LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly flag
550  * set. This function takes ownership of the InitSym, which should have been
551  * retained twice on behalf of this function: once for the Syms entry and once
552  * for InitSym. If clients wish to use the InitSym value after this function
553  * returns they must retain it once more for themselves.
554  *
555  * If any of the symbols in the Syms list is looked up then the Materialize
556  * function will be called.
557  *
558  * If any of the symbols in the Syms list is overridden then the Discard
559  * function will be called.
560  *
561  * The caller owns the underling MaterializationUnit and is responsible for
562  * either passing it to a JITDylib (via LLVMOrcJITDylibDefine) or disposing
563  * of it by calling LLVMOrcDisposeMaterializationUnit.
564  */
566  const char *Name, void *Ctx, LLVMOrcCSymbolFlagsMapPairs Syms,
567  size_t NumSyms, LLVMOrcSymbolStringPoolEntryRef InitSym,
571 
572 /**
573  * Create a MaterializationUnit to define the given symbols as pointing to
574  * the corresponding raw addresses.
575  *
576  * This function takes ownership of the elements of the Syms array. The Name
577  * fields of the array elements are taken to have been retained for this
578  * function. This allows the following pattern...
579  *
580  * size_t NumPairs;
581  * LLVMOrcCSymbolMapPairs Sym;
582  * -- Build Syms array --
583  * LLVMOrcMaterializationUnitRef MU =
584  * LLVMOrcAbsoluteSymbols(Syms, NumPairs);
585  *
586  * ... without requiring cleanup of the elements of the Sym array afterwards.
587  *
588  * The client is still responsible for deleting the Sym array itself.
589  *
590  * If a client wishes to reuse elements of the Sym array after this call they
591  * must explicitly retain each of the elements for themselves.
592  */
594 LLVMOrcAbsoluteSymbols(LLVMOrcCSymbolMapPairs Syms, size_t NumPairs);
595 
596 /**
597  * Create a MaterializationUnit to define lazy re-expots. These are callable
598  * entry points that call through to the given symbols.
599  *
600  * This function takes ownership of the CallableAliases array. The Name
601  * fields of the array elements are taken to have been retained for this
602  * function. This allows the following pattern...
603  *
604  * size_t NumPairs;
605  * LLVMOrcCSymbolAliasMapPairs CallableAliases;
606  * -- Build CallableAliases array --
607  * LLVMOrcMaterializationUnitRef MU =
608  * LLVMOrcLazyReexports(LCTM, ISM, JD, CallableAliases, NumPairs);
609  *
610  * ... without requiring cleanup of the elements of the CallableAliases array afterwards.
611  *
612  * The client is still responsible for deleting the CallableAliases array itself.
613  *
614  * If a client wishes to reuse elements of the CallableAliases array after this call they
615  * must explicitly retain each of the elements for themselves.
616  */
620  size_t NumPairs);
621 // TODO: ImplSymbolMad SrcJDLoc
622 
623 /**
624  * Disposes of the passed MaterializationResponsibility object.
625  *
626  * This should only be done after the symbols covered by the object have either
627  * been resolved and emitted (via
628  * LLVMOrcMaterializationResponsibilityNotifyResolved and
629  * LLVMOrcMaterializationResponsibilityNotifyEmitted) or failed (via
630  * LLVMOrcMaterializationResponsibilityFailMaterialization).
631  */
634 
635 /**
636  * Returns the target JITDylib that these symbols are being materialized into.
637  */
640 
641 /**
642  * Returns the ExecutionSession for this MaterializationResponsibility.
643  */
647 
648 /**
649  * Returns the symbol flags map for this responsibility instance.
650  *
651  * The length of the array is returned in NumPairs and the caller is responsible
652  * for the returned memory and needs to call LLVMOrcDisposeCSymbolFlagsMap.
653  *
654  * To use the returned symbols beyond the livetime of the
655  * MaterializationResponsibility requires the caller to retain the symbols
656  * explicitly.
657  */
659  LLVMOrcMaterializationResponsibilityRef MR, size_t *NumPairs);
660 
661 /**
662  * Disposes of the passed LLVMOrcCSymbolFlagsMap.
663  *
664  * Does not release the entries themselves.
665  */
667 
668 /**
669  * Returns the initialization pseudo-symbol, if any. This symbol will also
670  * be present in the SymbolFlagsMap for this MaterializationResponsibility
671  * object.
672  *
673  * The returned symbol is not retained over any mutating operation of the
674  * MaterializationResponsbility or beyond the lifetime thereof.
675  */
679 
680 /**
681  * Returns the names of any symbols covered by this
682  * MaterializationResponsibility object that have queries pending. This
683  * information can be used to return responsibility for unrequested symbols
684  * back to the JITDylib via the delegate method.
685  */
688  LLVMOrcMaterializationResponsibilityRef MR, size_t *NumSymbols);
689 
690 /**
691  * Disposes of the passed LLVMOrcSymbolStringPoolEntryRef* .
692  *
693  * Does not release the symbols themselves.
694  */
696 
697 /*
698  * Notifies the target JITDylib that the given symbols have been resolved.
699  * This will update the given symbols' addresses in the JITDylib, and notify
700  * any pending queries on the given symbols of their resolution. The given
701  * symbols must be ones covered by this MaterializationResponsibility
702  * instance. Individual calls to this method may resolve a subset of the
703  * symbols, but all symbols must have been resolved prior to calling emit.
704  *
705  * This method will return an error if any symbols being resolved have been
706  * moved to the error state due to the failure of a dependency. If this
707  * method returns an error then clients should log it and call
708  * LLVMOrcMaterializationResponsibilityFailMaterialization. If no dependencies
709  * have been registered for the symbols covered by this
710  * MaterializationResponsibiility then this method is guaranteed to return
711  * LLVMErrorSuccess.
712  */
715  size_t NumPairs);
716 
717 /**
718  * Notifies the target JITDylib (and any pending queries on that JITDylib)
719  * that all symbols covered by this MaterializationResponsibility instance
720  * have been emitted.
721  *
722  * This method will return an error if any symbols being resolved have been
723  * moved to the error state due to the failure of a dependency. If this
724  * method returns an error then clients should log it and call
725  * LLVMOrcMaterializationResponsibilityFailMaterialization.
726  * If no dependencies have been registered for the symbols covered by this
727  * MaterializationResponsibiility then this method is guaranteed to return
728  * LLVMErrorSuccess.
729  */
732 
733 /**
734  * Attempt to claim responsibility for new definitions. This method can be
735  * used to claim responsibility for symbols that are added to a
736  * materialization unit during the compilation process (e.g. literal pool
737  * symbols). Symbol linkage rules are the same as for symbols that are
738  * defined up front: duplicate strong definitions will result in errors.
739  * Duplicate weak definitions will be discarded (in which case they will
740  * not be added to this responsibility instance).
741  *
742  * This method can be used by materialization units that want to add
743  * additional symbols at materialization time (e.g. stubs, compile
744  * callbacks, metadata)
745  */
748  LLVMOrcCSymbolFlagsMapPairs Pairs, size_t NumPairs);
749 
750 /**
751  * Notify all not-yet-emitted covered by this MaterializationResponsibility
752  * instance that an error has occurred.
753  * This will remove all symbols covered by this MaterializationResponsibilty
754  * from the target JITDylib, and send an error to any queries waiting on
755  * these symbols.
756  */
759 
760 /**
761  * Transfers responsibility to the given MaterializationUnit for all
762  * symbols defined by that MaterializationUnit. This allows
763  * materializers to break up work based on run-time information (e.g.
764  * by introspecting which symbols have actually been looked up and
765  * materializing only those).
766  */
770 
771 /**
772  * Delegates responsibility for the given symbols to the returned
773  * materialization responsibility. Useful for breaking up work between
774  * threads, or different kinds of materialization processes.
775  *
776  * The caller retains responsibility of the the passed
777  * MaterializationResponsibility.
778  */
781  LLVMOrcSymbolStringPoolEntryRef *Symbols, size_t NumSymbols,
783 
784 /**
785  * Adds dependencies to a symbol that the MaterializationResponsibility is
786  * responsible for.
787  *
788  * This function takes ownership of Dependencies struct. The Names
789  * array have been retained for this function. This allows the following
790  * pattern...
791  *
792  * LLVMOrcSymbolStringPoolEntryRef Names[] = {...};
793  * LLVMOrcCDependenceMapPair Dependence = {JD, {Names, sizeof(Names)}}
794  * LLVMOrcMaterializationResponsibilityAddDependencies(JD, Name, &Dependence,
795  * 1);
796  *
797  * ... without requiring cleanup of the elements of the Names array afterwards.
798  *
799  * The client is still responsible for deleting the Dependencies.Names array
800  * itself.
801  */
805  LLVMOrcCDependenceMapPairs Dependencies, size_t NumPairs);
806 
807 /**
808  * Adds dependencies to all symbols that the MaterializationResponsibility is
809  * responsible for. See LLVMOrcMaterializationResponsibilityAddDependencies for
810  * notes about memory responsibility.
811  */
814  LLVMOrcCDependenceMapPairs Dependencies, size_t NumPairs);
815 
816 /**
817  * Create a "bare" JITDylib.
818  *
819  * The client is responsible for ensuring that the JITDylib's name is unique,
820  * e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.
821  *
822  * This call does not install any library code or symbols into the newly
823  * created JITDylib. The client is responsible for all configuration.
824  */
827  const char *Name);
828 
829 /**
830  * Create a JITDylib.
831  *
832  * The client is responsible for ensuring that the JITDylib's name is unique,
833  * e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.
834  *
835  * If a Platform is attached to the ExecutionSession then
836  * Platform::setupJITDylib will be called to install standard platform symbols
837  * (e.g. standard library interposes). If no Platform is installed then this
838  * call is equivalent to LLVMExecutionSessionRefCreateBareJITDylib and will
839  * always return success.
840  */
843  LLVMOrcJITDylibRef *Result,
844  const char *Name);
845 
846 /**
847  * Returns the JITDylib with the given name, or NULL if no such JITDylib
848  * exists.
849  */
852  const char *Name);
853 
854 /**
855  * Return a reference to a newly created resource tracker associated with JD.
856  * The tracker is returned with an initial ref-count of 1, and must be released
857  * with LLVMOrcReleaseResourceTracker when no longer needed.
858  */
861 
862 /**
863  * Return a reference to the default resource tracker for the given JITDylib.
864  * This operation will increase the retain count of the tracker: Clients should
865  * call LLVMOrcReleaseResourceTracker when the result is no longer needed.
866  */
869 
870 /**
871  * Add the given MaterializationUnit to the given JITDylib.
872  *
873  * If this operation succeeds then JITDylib JD will take ownership of MU.
874  * If the operation fails then ownership remains with the caller who should
875  * call LLVMOrcDisposeMaterializationUnit to destroy it.
876  */
879 
880 /**
881  * Calls remove on all trackers associated with this JITDylib, see
882  * JITDylib::clear().
883  */
885 
886 /**
887  * Add a DefinitionGenerator to the given JITDylib.
888  *
889  * The JITDylib will take ownership of the given generator: The client is no
890  * longer responsible for managing its memory.
891  */
894 
895 /**
896  * Create a custom generator.
897  */
900 
901 /**
902  * Get a DynamicLibrarySearchGenerator that will reflect process symbols into
903  * the JITDylib. On success the resulting generator is owned by the client.
904  * Ownership is typically transferred by adding the instance to a JITDylib
905  * using LLVMOrcJITDylibAddGenerator,
906  *
907  * The GlobalPrefix argument specifies the character that appears on the front
908  * of linker-mangled symbols for the target platform (e.g. '_' on MachO).
909  * If non-null, this character will be stripped from the start of all symbol
910  * strings before passing the remaining substring to dlsym.
911  *
912  * The optional Filter and Ctx arguments can be used to supply a symbol name
913  * filter: Only symbols for which the filter returns true will be visible to
914  * JIT'd code. If the Filter argument is null then all process symbols will
915  * be visible to JIT'd code. Note that the symbol name passed to the Filter
916  * function is the full mangled symbol: The client is responsible for stripping
917  * the global prefix if present.
918  */
920  LLVMOrcDefinitionGeneratorRef *Result, char GlobalPrefx,
921  LLVMOrcSymbolPredicate Filter, void *FilterCtx);
922 
923 /**
924  * Get a LLVMOrcCreateDynamicLibararySearchGeneratorForPath that will reflect
925  * library symbols into the JITDylib. On success the resulting generator is
926  * owned by the client. Ownership is typically transferred by adding the
927  * instance to a JITDylib using LLVMOrcJITDylibAddGenerator,
928  *
929  * The GlobalPrefix argument specifies the character that appears on the front
930  * of linker-mangled symbols for the target platform (e.g. '_' on MachO).
931  * If non-null, this character will be stripped from the start of all symbol
932  * strings before passing the remaining substring to dlsym.
933  *
934  * The optional Filter and Ctx arguments can be used to supply a symbol name
935  * filter: Only symbols for which the filter returns true will be visible to
936  * JIT'd code. If the Filter argument is null then all library symbols will
937  * be visible to JIT'd code. Note that the symbol name passed to the Filter
938  * function is the full mangled symbol: The client is responsible for stripping
939  * the global prefix if present.
940  *
941  * THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
942  *
943  */
945  LLVMOrcDefinitionGeneratorRef *Result, const char *FileName,
946  char GlobalPrefix, LLVMOrcSymbolPredicate Filter, void *FilterCtx);
947 
948 /**
949  * Get a LLVMOrcCreateStaticLibrarySearchGeneratorForPath that will reflect
950  * static library symbols into the JITDylib. On success the resulting
951  * generator is owned by the client. Ownership is typically transferred by
952  * adding the instance to a JITDylib using LLVMOrcJITDylibAddGenerator,
953  *
954  * Call with the optional TargetTriple argument will succeed if the file at
955  * the given path is a static library or a MachO universal binary containing a
956  * static library that is compatible with the given triple. Otherwise it will
957  * return an error.
958  *
959  * THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
960  *
961  */
964  const char *FileName, const char *TargetTriple);
965 
966 /**
967  * Create a ThreadSafeContext containing a new LLVMContext.
968  *
969  * Ownership of the underlying ThreadSafeContext data is shared: Clients
970  * can and should dispose of their ThreadSafeContext as soon as they no longer
971  * need to refer to it directly. Other references (e.g. from ThreadSafeModules)
972  * will keep the data alive as long as it is needed.
973  */
975 
976 /**
977  * Get a reference to the wrapped LLVMContext.
978  */
981 
982 /**
983  * Dispose of a ThreadSafeContext.
984  */
986 
987 /**
988  * Create a ThreadSafeModule wrapper around the given LLVM module. This takes
989  * ownership of the M argument which should not be disposed of or referenced
990  * after this function returns.
991  *
992  * Ownership of the ThreadSafeModule is unique: If it is transferred to the JIT
993  * (e.g. by LLVMOrcLLJITAddLLVMIRModule) then the client is no longer
994  * responsible for it. If it is not transferred to the JIT then the client
995  * should call LLVMOrcDisposeThreadSafeModule to dispose of it.
996  */
1000 
1001 /**
1002  * Dispose of a ThreadSafeModule. This should only be called if ownership has
1003  * not been passed to LLJIT (e.g. because some error prevented the client from
1004  * adding this to the JIT).
1005  */
1007 
1008 /**
1009  * Apply the given function to the module contained in this ThreadSafeModule.
1010  */
1014  void *Ctx);
1015 
1016 /**
1017  * Create a JITTargetMachineBuilder by detecting the host.
1018  *
1019  * On success the client owns the resulting JITTargetMachineBuilder. It must be
1020  * passed to a consuming operation (e.g.
1021  * LLVMOrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by calling
1022  * LLVMOrcDisposeJITTargetMachineBuilder.
1023  */
1026 
1027 /**
1028  * Create a JITTargetMachineBuilder from the given TargetMachine template.
1029  *
1030  * This operation takes ownership of the given TargetMachine and destroys it
1031  * before returing. The resulting JITTargetMachineBuilder is owned by the client
1032  * and must be passed to a consuming operation (e.g.
1033  * LLVMOrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by calling
1034  * LLVMOrcDisposeJITTargetMachineBuilder.
1035  */
1038 
1039 /**
1040  * Dispose of a JITTargetMachineBuilder.
1041  */
1044 
1045 /**
1046  * Returns the target triple for the given JITTargetMachineBuilder as a string.
1047  *
1048  * The caller owns the resulting string as must dispose of it by calling
1049  * LLVMDisposeMessage
1050  */
1053 
1054 /**
1055  * Sets the target triple for the given JITTargetMachineBuilder to the given
1056  * string.
1057  */
1059  LLVMOrcJITTargetMachineBuilderRef JTMB, const char *TargetTriple);
1060 
1061 /**
1062  * Add an object to an ObjectLayer to the given JITDylib.
1063  *
1064  * Adds a buffer representing an object file to the given JITDylib using the
1065  * given ObjectLayer instance. This operation transfers ownership of the buffer
1066  * to the ObjectLayer instance. The buffer should not be disposed of or
1067  * referenced once this function returns.
1068  *
1069  * Resources associated with the given object will be tracked by the given
1070  * JITDylib's default ResourceTracker.
1071  */
1073  LLVMOrcJITDylibRef JD,
1074  LLVMMemoryBufferRef ObjBuffer);
1075 
1076 /**
1077  * Add an object to an ObjectLayer using the given ResourceTracker.
1078  *
1079  * Adds a buffer representing an object file to the given ResourceTracker's
1080  * JITDylib using the given ObjectLayer instance. This operation transfers
1081  * ownership of the buffer to the ObjectLayer instance. The buffer should not
1082  * be disposed of or referenced once this function returns.
1083  *
1084  * Resources associated with the given object will be tracked by
1085  * ResourceTracker RT.
1086  */
1090  LLVMMemoryBufferRef ObjBuffer);
1091 
1092 /**
1093  * Emit an object buffer to an ObjectLayer.
1094  *
1095  * Ownership of the responsibility object and object buffer pass to this
1096  * function. The client is not responsible for cleanup.
1097  */
1100  LLVMMemoryBufferRef ObjBuffer);
1101 
1102 /**
1103  * Dispose of an ObjectLayer.
1104  */
1106 
1110 
1111 /**
1112  * Set the transform function of the provided transform layer, passing through a
1113  * pointer to user provided context.
1114  */
1116  LLVMOrcIRTransformLayerRef IRTransformLayer,
1117  LLVMOrcIRTransformLayerTransformFunction TransformFunction, void *Ctx);
1118 
1119 /**
1120  * Set the transform function on an LLVMOrcObjectTransformLayer.
1121  */
1123  LLVMOrcObjectTransformLayerRef ObjTransformLayer,
1124  LLVMOrcObjectTransformLayerTransformFunction TransformFunction, void *Ctx);
1125 
1126 /**
1127  * Create a LocalIndirectStubsManager from the given target triple.
1128  *
1129  * The resulting IndirectStubsManager is owned by the client
1130  * and must be disposed of by calling LLVMOrcDisposeDisposeIndirectStubsManager.
1131  */
1133 LLVMOrcCreateLocalIndirectStubsManager(const char *TargetTriple);
1134 
1135 /**
1136  * Dispose of an IndirectStubsManager.
1137  */
1139 
1141  const char *TargetTriple, LLVMOrcExecutionSessionRef ES,
1142  LLVMOrcJITTargetAddress ErrorHandlerAddr,
1144 
1145 /**
1146  * Dispose of an LazyCallThroughManager.
1147  */
1150 
1151 /**
1152  * Create a DumpObjects instance.
1153  *
1154  * DumpDir specifies the path to write dumped objects to. DumpDir may be empty
1155  * in which case files will be dumped to the working directory.
1156  *
1157  * IdentifierOverride specifies a file name stem to use when dumping objects.
1158  * If empty then each MemoryBuffer's identifier will be used (with a .o suffix
1159  * added if not already present). If an identifier override is supplied it will
1160  * be used instead, along with an incrementing counter (since all buffers will
1161  * use the same identifier, the resulting files will be named <ident>.o,
1162  * <ident>.2.o, <ident>.3.o, and so on). IdentifierOverride should not contain
1163  * an extension, as a .o suffix will be added by DumpObjects.
1164  */
1166  const char *IdentifierOverride);
1167 
1168 /**
1169  * Dispose of a DumpObjects instance.
1170  */
1172 
1173 /**
1174  * Dump the contents of the given MemoryBuffer.
1175  */
1177  LLVMMemoryBufferRef *ObjBuffer);
1178 
1180 
1181 #endif /* LLVM_C_ORC_H */
LLVMOrcCSymbolFlagsMapPairs
LLVMOrcCSymbolFlagsMapPair * LLVMOrcCSymbolFlagsMapPairs
Represents a list of (SymbolStringPtr, JITSymbolFlags) pairs that can be used to construct a SymbolFl...
Definition: Orc.h:110
LLVMOrcCLookupSetElement
An element type for a symbol lookup set.
Definition: Orc.h:210
LLVMOrcRetainSymbolStringPoolEntry
void LLVMOrcRetainSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S)
Increments the ref-count for a SymbolStringPool entry.
Definition: OrcV2CBindings.cpp:310
LLVMOrcLazyReexports
LLVMOrcMaterializationUnitRef LLVMOrcLazyReexports(LLVMOrcLazyCallThroughManagerRef LCTM, LLVMOrcIndirectStubsManagerRef ISM, LLVMOrcJITDylibRef SourceRef, LLVMOrcCSymbolAliasMapPairs CallableAliases, size_t NumPairs)
Create a MaterializationUnit to define lazy re-expots.
Definition: OrcV2CBindings.cpp:384
LLVMOrcCDependenceMapPair::JD
LLVMOrcJITDylibRef JD
Definition: Orc.h:166
LLVMOrcMaterializationUnitMaterializeFunction
void(* LLVMOrcMaterializationUnitMaterializeFunction)(void *Ctx, LLVMOrcMaterializationResponsibilityRef MR)
A MaterializationUnit materialize callback.
Definition: Orc.h:251
LLVMOrcResourceTrackerRef
struct LLVMOrcOpaqueResourceTracker * LLVMOrcResourceTrackerRef
A reference to an orc::ResourceTracker instance.
Definition: Orc.h:275
LLVMOrcCDependenceMapPair
Represents a pair of a JITDylib and LLVMOrcCSymbolsList.
Definition: Orc.h:165
LLVMOrcExecutionSessionCreateJITDylib
LLVMErrorRef LLVMOrcExecutionSessionCreateJITDylib(LLVMOrcExecutionSessionRef ES, LLVMOrcJITDylibRef *Result, const char *Name)
Create a JITDylib.
Definition: OrcV2CBindings.cpp:555
LLVMOrcDisposeThreadSafeContext
void LLVMOrcDisposeThreadSafeContext(LLVMOrcThreadSafeContextRef TSCtx)
Dispose of a ThreadSafeContext.
Definition: OrcV2CBindings.cpp:686
LLVMContextRef
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
Definition: Types.h:53
LLVMOrcJITDylibClear
LLVMErrorRef LLVMOrcJITDylibClear(LLVMOrcJITDylibRef JD)
Calls remove on all trackers associated with this JITDylib, see JITDylib::clear().
Definition: OrcV2CBindings.cpp:582
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
LLVMOrcCreateCustomCAPIDefinitionGenerator
LLVMOrcDefinitionGeneratorRef LLVMOrcCreateCustomCAPIDefinitionGenerator(LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction F, void *Ctx)
Create a custom generator.
Definition: OrcV2CBindings.cpp:591
LLVMOrcJITTargetMachineBuilderGetTargetTriple
char * LLVMOrcJITTargetMachineBuilderGetTargetTriple(LLVMOrcJITTargetMachineBuilderRef JTMB)
Returns the target triple for the given JITTargetMachineBuilder as a string.
Definition: OrcV2CBindings.cpp:748
LLVMOrcReleaseSymbolStringPoolEntry
void LLVMOrcReleaseSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S)
Reduces the ref-count for of a SymbolStringPool entry.
Definition: OrcV2CBindings.cpp:314
LLVMJITSymbolGenericFlags
LLVMJITSymbolGenericFlags
Represents generic linkage flags for a symbol definition.
Definition: Orc.h:49
LLVMOrcCSymbolsList::Symbols
LLVMOrcSymbolStringPoolEntryRef * Symbols
Definition: Orc.h:158
LLVMOrcCSymbolAliasMapPair::Entry
LLVMOrcCSymbolAliasMapEntry Entry
Definition: Orc.h:139
LLVMOrcCreateNewThreadSafeContext
LLVMOrcThreadSafeContextRef LLVMOrcCreateNewThreadSafeContext(void)
Create a ThreadSafeContext containing a new LLVMContext.
Definition: OrcV2CBindings.cpp:677
LLVMOrcMaterializationResponsibilityGetTargetDylib
LLVMOrcJITDylibRef LLVMOrcMaterializationResponsibilityGetTargetDylib(LLVMOrcMaterializationResponsibilityRef MR)
Returns the target JITDylib that these symbols are being materialized into.
Definition: OrcV2CBindings.cpp:409
LLVMJITSymbolGenericFlagsExported
@ LLVMJITSymbolGenericFlagsExported
Definition: Orc.h:50
LLVMOrcDumpObjects_CallOperator
LLVMErrorRef LLVMOrcDumpObjects_CallOperator(LLVMOrcDumpObjectsRef DumpObjects, LLVMMemoryBufferRef *ObjBuffer)
Dump the contents of the given MemoryBuffer.
Definition: OrcV2CBindings.cpp:831
LLVMOrcResourceTrackerRemove
LLVMErrorRef LLVMOrcResourceTrackerRemove(LLVMOrcResourceTrackerRef RT)
Remove all resources associated with the given tracker.
Definition: OrcV2CBindings.cpp:348
Types.h
LLVMOrcMaterializationResponsibilityGetExecutionSession
LLVMOrcExecutionSessionRef LLVMOrcMaterializationResponsibilityGetExecutionSession(LLVMOrcMaterializationResponsibilityRef MR)
Returns the ExecutionSession for this MaterializationResponsibility.
Definition: OrcV2CBindings.cpp:415
LLVMOrcCreateLocalIndirectStubsManager
LLVMOrcIndirectStubsManagerRef LLVMOrcCreateLocalIndirectStubsManager(const char *TargetTriple)
Create a LocalIndirectStubsManager from the given target triple.
Definition: OrcV2CBindings.cpp:993
LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess
LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(LLVMOrcDefinitionGeneratorRef *Result, char GlobalPrefx, LLVMOrcSymbolPredicate Filter, void *FilterCtx)
Get a DynamicLibrarySearchGenerator that will reflect process symbols into the JITDylib.
Definition: OrcV2CBindings.cpp:597
LLVMOrcLookupKindStatic
@ LLVMOrcLookupKindStatic
Definition: Orc.h:183
LLVMOrcCSymbolMapPairs
LLVMJITCSymbolMapPair * LLVMOrcCSymbolMapPairs
Represents a list of (SymbolStringPtr, JITEvaluatedSymbol) pairs that can be used to construct a Symb...
Definition: Orc.h:124
LLVMOrcExecutionSessionGetSymbolStringPool
LLVMOrcSymbolStringPoolRef LLVMOrcExecutionSessionGetSymbolStringPool(LLVMOrcExecutionSessionRef ES)
Return a reference to the SymbolStringPool for an ExecutionSession.
Definition: OrcV2CBindings.cpp:295
GlobalPrefix
@ GlobalPrefix
Definition: AsmWriter.cpp:344
LLVMOrcExecutionSessionIntern
LLVMOrcSymbolStringPoolEntryRef LLVMOrcExecutionSessionIntern(LLVMOrcExecutionSessionRef ES, const char *Name)
Intern a string in the ExecutionSession's SymbolStringPool and return a reference to it.
Definition: OrcV2CBindings.cpp:305
LLVMOrcThreadSafeContextGetContext
LLVMContextRef LLVMOrcThreadSafeContextGetContext(LLVMOrcThreadSafeContextRef TSCtx)
Get a reference to the wrapped LLVMContext.
Definition: OrcV2CBindings.cpp:682
LLVMOrcCreateStaticLibrarySearchGeneratorForPath
LLVMErrorRef LLVMOrcCreateStaticLibrarySearchGeneratorForPath(LLVMOrcDefinitionGeneratorRef *Result, LLVMOrcObjectLayerRef ObjLayer, const char *FileName, const char *TargetTriple)
Get a LLVMOrcCreateStaticLibrarySearchGeneratorForPath that will reflect static library symbols into ...
Definition: OrcV2CBindings.cpp:648
LLVMOrcMaterializationUnitDestroyFunction
void(* LLVMOrcMaterializationUnitDestroyFunction)(void *Ctx)
A MaterializationUnit destruction callback.
Definition: Orc.h:270
LLVMOrcMaterializationResponsibilityGetInitializerSymbol
LLVMOrcSymbolStringPoolEntryRef LLVMOrcMaterializationResponsibilityGetInitializerSymbol(LLVMOrcMaterializationResponsibilityRef MR)
Returns the initialization pseudo-symbol, if any.
Definition: OrcV2CBindings.cpp:442
LLVMOrcMaterializationResponsibilityNotifyEmitted
LLVMErrorRef LLVMOrcMaterializationResponsibilityNotifyEmitted(LLVMOrcMaterializationResponsibilityRef MR)
Notifies the target JITDylib (and any pending queries on that JITDylib) that all symbols covered by t...
Definition: OrcV2CBindings.cpp:476
LLVMOrcDisposeObjectLayer
void LLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer)
Dispose of an ObjectLayer.
Definition: OrcV2CBindings.cpp:784
LLVMOrcJITTargetMachineBuilderRef
struct LLVMOrcOpaqueJITTargetMachineBuilder * LLVMOrcJITTargetMachineBuilderRef
A reference to an orc::JITTargetMachineBuilder instance.
Definition: Orc.h:362
LLVMOrcCreateLocalLazyCallThroughManager
LLVMErrorRef LLVMOrcCreateLocalLazyCallThroughManager(const char *TargetTriple, LLVMOrcExecutionSessionRef ES, LLVMOrcJITTargetAddress ErrorHandlerAddr, LLVMOrcLazyCallThroughManagerRef *LCTM)
Definition: OrcV2CBindings.cpp:1002
LLVMOrcMaterializationResponsibilityNotifyResolved
LLVMErrorRef LLVMOrcMaterializationResponsibilityNotifyResolved(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCSymbolMapPairs Symbols, size_t NumPairs)
Definition: OrcV2CBindings.cpp:469
LLVMOrcJITTargetMachineBuilderSetTargetTriple
void LLVMOrcJITTargetMachineBuilderSetTargetTriple(LLVMOrcJITTargetMachineBuilderRef JTMB, const char *TargetTriple)
Sets the target triple for the given JITTargetMachineBuilder to the given string.
Definition: OrcV2CBindings.cpp:756
LLVMOrcCSymbolAliasMapEntry::Flags
LLVMJITSymbolFlags Flags
Definition: Orc.h:131
LLVMOrcSymbolStringPoolEntryRef
struct LLVMOrcOpaqueSymbolStringPoolEntry * LLVMOrcSymbolStringPoolEntryRef
A reference to an orc::SymbolStringPool table entry.
Definition: Orc.h:95
LLVMOrcObjectLayerAddObjectFileWithRT
LLVMErrorRef LLVMOrcObjectLayerAddObjectFileWithRT(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcResourceTrackerRef RT, LLVMMemoryBufferRef ObjBuffer)
Add an object to an ObjectLayer using the given ResourceTracker.
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::RISCVFenceField::R
@ R
Definition: RISCVBaseInfo.h:198
LLVMOrcMaterializationResponsibilityDelegate
LLVMErrorRef LLVMOrcMaterializationResponsibilityDelegate(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcSymbolStringPoolEntryRef *Symbols, size_t NumSymbols, LLVMOrcMaterializationResponsibilityRef *Result)
Delegates responsibility for the given symbols to the returned materialization responsibility.
Definition: OrcV2CBindings.cpp:499
LLVMOrcCSymbolFlagsMapPair
Represents a pair of a symbol name and LLVMJITSymbolFlags.
Definition: Orc.h:101
LLVMOrcJITDylibRef
struct LLVMOrcOpaqueJITDylib * LLVMOrcJITDylibRef
A reference to an orc::JITDylib instance.
Definition: Orc.h:151
LLVMOrcDisposeCSymbolFlagsMap
void LLVMOrcDisposeCSymbolFlagsMap(LLVMOrcCSymbolFlagsMapPairs Pairs)
Disposes of the passed LLVMOrcCSymbolFlagsMap.
Definition: OrcV2CBindings.cpp:437
LLVMOrcObjectTransformLayerSetTransform
void LLVMOrcObjectTransformLayerSetTransform(LLVMOrcObjectTransformLayerRef ObjTransformLayer, LLVMOrcObjectTransformLayerTransformFunction TransformFunction, void *Ctx)
Set the transform function on an LLVMOrcObjectTransformLayer.
Definition: OrcV2CBindings.cpp:805
LLVMOrcCSymbolAliasMapPairs
LLVMOrcCSymbolAliasMapPair * LLVMOrcCSymbolAliasMapPairs
Represents a list of (SymbolStringPtr, (SymbolStringPtr, JITSymbolFlags)) pairs that can be used to c...
Definition: Orc.h:146
LLVMJITSymbolGenericFlagsWeak
@ LLVMJITSymbolGenericFlagsWeak
Definition: Orc.h:51
LLVMOrcIRTransformLayerSetTransform
void LLVMOrcIRTransformLayerSetTransform(LLVMOrcIRTransformLayerRef IRTransformLayer, LLVMOrcIRTransformLayerTransformFunction TransformFunction, void *Ctx)
Set the transform function of the provided transform layer, passing through a pointer to user provide...
Definition: OrcV2CBindings.cpp:788
LLVMJITEvaluatedSymbol
Represents an evaluated symbol address and flags.
Definition: Orc.h:72
LLVMOrcJITTargetMachineBuilderDetectHost
LLVMErrorRef LLVMOrcJITTargetMachineBuilderDetectHost(LLVMOrcJITTargetMachineBuilderRef *Result)
Create a JITTargetMachineBuilder by detecting the host.
Definition: OrcV2CBindings.cpp:709
LLVMOrcObjectLayerEmit
void LLVMOrcObjectLayerEmit(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcMaterializationResponsibilityRef R, LLVMMemoryBufferRef ObjBuffer)
Emit an object buffer to an ObjectLayer.
Definition: OrcV2CBindings.cpp:776
LLVMOrcJITDylibLookupFlagsMatchAllSymbols
@ LLVMOrcJITDylibLookupFlagsMatchAllSymbols
Definition: Orc.h:195
int
Clang compiles this i1 i64 store i64 i64 store i64 i64 store i64 i64 store i64 align Which gets codegen d xmm0 movaps rbp movaps rbp movaps rbp movaps rbp rbp rbp rbp rbp It would be better to have movq s of instead of the movaps s LLVM produces ret int
Definition: README.txt:536
LLVMOrcJITDylibCreateResourceTracker
LLVMOrcResourceTrackerRef LLVMOrcJITDylibCreateResourceTracker(LLVMOrcJITDylibRef JD)
Return a reference to a newly created resource tracker associated with JD.
Definition: OrcV2CBindings.cpp:323
LLVMOrcMaterializationResponsibilityFailMaterialization
void LLVMOrcMaterializationResponsibilityFailMaterialization(LLVMOrcMaterializationResponsibilityRef MR)
Notify all not-yet-emitted covered by this MaterializationResponsibility instance that an error has o...
Definition: OrcV2CBindings.cpp:534
LLVMOrcMaterializationResponsibilityRef
struct LLVMOrcOpaqueMaterializationResponsibility * LLVMOrcMaterializationResponsibilityRef
A reference to a uniquely owned orc::MaterializationResponsibility instance.
Definition: Orc.h:238
LLVMOrcSymbolPredicate
int(* LLVMOrcSymbolPredicate)(void *Ctx, LLVMOrcSymbolStringPoolEntryRef Sym)
Predicate function for SymbolStringPoolEntries.
Definition: Orc.h:339
LLVMOrcCSymbolsList::Length
size_t Length
Definition: Orc.h:159
LLVMOrcCSymbolFlagsMapPair::Name
LLVMOrcSymbolStringPoolEntryRef Name
Definition: Orc.h:102
LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnly
@ LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnly
Definition: Orc.h:194
LLVMJITEvaluatedSymbol::Address
LLVMOrcExecutorAddress Address
Definition: Orc.h:73
LLVMOrcCreateDynamicLibrarySearchGeneratorForPath
LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(LLVMOrcDefinitionGeneratorRef *Result, const char *FileName, char GlobalPrefix, LLVMOrcSymbolPredicate Filter, void *FilterCtx)
Get a LLVMOrcCreateDynamicLibararySearchGeneratorForPath that will reflect library symbols into the J...
Definition: OrcV2CBindings.cpp:622
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
LLVMOrcLazyCallThroughManagerRef
struct LLVMOrcOpaqueLazyCallThroughManager * LLVMOrcLazyCallThroughManagerRef
A reference to an orc::LazyCallThroughManager instance.
Definition: Orc.h:430
LLVMOrcCSymbolAliasMapEntry
Represents a SymbolAliasMapEntry.
Definition: Orc.h:129
LLVMOrcDisposeJITTargetMachineBuilder
void LLVMOrcDisposeJITTargetMachineBuilder(LLVMOrcJITTargetMachineBuilderRef JTMB)
Dispose of a JITTargetMachineBuilder.
Definition: OrcV2CBindings.cpp:743
LLVMOrcExecutionSessionGetJITDylibByName
LLVMOrcJITDylibRef LLVMOrcExecutionSessionGetJITDylibByName(LLVMOrcExecutionSessionRef ES, const char *Name)
Returns the JITDylib with the given name, or NULL if no such JITDylib exists.
Definition: OrcV2CBindings.cpp:566
LLVMOrcObjectLinkingLayerRef
struct LLVMOrcOpaqueObjectLinkingLayer * LLVMOrcObjectLinkingLayerRef
A reference to an orc::ObjectLinkingLayer instance.
Definition: Orc.h:373
LLVMOrcDisposeMaterializationUnit
void LLVMOrcDisposeMaterializationUnit(LLVMOrcMaterializationUnitRef MU)
Dispose of a MaterializationUnit.
Definition: OrcV2CBindings.cpp:357
LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction
LLVMErrorRef(* LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction)(LLVMOrcDefinitionGeneratorRef GeneratorObj, void *Ctx, LLVMOrcLookupStateRef *LookupState, LLVMOrcLookupKind Kind, LLVMOrcJITDylibRef JD, LLVMOrcJITDylibLookupFlags JDLookupFlags, LLVMOrcCLookupSet LookupSet, size_t LookupSetSize)
A custom generator function.
Definition: Orc.h:330
uint64_t
LLVMOrcCDependenceMapPairs
LLVMOrcCDependenceMapPair * LLVMOrcCDependenceMapPairs
Represents a list of (JITDylibRef, (LLVMOrcSymbolStringPoolEntryRef*, size_t)) pairs that can be used...
Definition: Orc.h:174
LLVMOrcMaterializationResponsibilityAddDependencies
void LLVMOrcMaterializationResponsibilityAddDependencies(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcSymbolStringPoolEntryRef Name, LLVMOrcCDependenceMapPairs Dependencies, size_t NumPairs)
Adds dependencies to a symbol that the MaterializationResponsibility is responsible for.
Definition: OrcV2CBindings.cpp:516
LLVMOrcCSymbolAliasMapPair::Name
LLVMOrcSymbolStringPoolEntryRef Name
Definition: Orc.h:138
LLVMTargetMachineRef
typedefLLVM_C_EXTERN_C_BEGIN struct LLVMOpaqueTargetMachine * LLVMTargetMachineRef
Definition: TargetMachine.h:28
LLVMOrcJITDylibDefine
LLVMErrorRef LLVMOrcJITDylibDefine(LLVMOrcJITDylibRef JD, LLVMOrcMaterializationUnitRef MU)
Add the given MaterializationUnit to the given JITDylib.
Definition: OrcV2CBindings.cpp:571
LLVMJITEvaluatedSymbol::Flags
LLVMJITSymbolFlags Flags
Definition: Orc.h:74
LLVMOrcDefinitionGeneratorRef
struct LLVMOrcOpaqueDefinitionGenerator * LLVMOrcDefinitionGeneratorRef
A reference to an orc::DefinitionGenerator.
Definition: Orc.h:280
LLVMOrcResourceTrackerTransferTo
void LLVMOrcResourceTrackerTransferTo(LLVMOrcResourceTrackerRef SrcRT, LLVMOrcResourceTrackerRef DstRT)
Transfers tracking of all resources associated with resource tracker SrcRT to resource tracker DstRT.
Definition: OrcV2CBindings.cpp:342
LLVMOrcDisposeDefinitionGenerator
void LLVMOrcDisposeDefinitionGenerator(LLVMOrcDefinitionGeneratorRef DG)
Dispose of a JITDylib::DefinitionGenerator.
Definition: OrcV2CBindings.cpp:353
LLVMOrcDumpObjectsRef
struct LLVMOrcOpaqueDumpObjects * LLVMOrcDumpObjectsRef
A reference to an orc::DumpObjects object.
Definition: Orc.h:439
LLVMOrcDisposeThreadSafeModule
void LLVMOrcDisposeThreadSafeModule(LLVMOrcThreadSafeModuleRef TSM)
Dispose of a ThreadSafeModule.
Definition: OrcV2CBindings.cpp:705
LLVMOrcSymbolStringPoolClearDeadEntries
void LLVMOrcSymbolStringPoolClearDeadEntries(LLVMOrcSymbolStringPoolRef SSP)
Clear all unreferenced symbol string pool entries.
Definition: OrcV2CBindings.cpp:300
LLVMOrcCSymbolFlagsMapPair::Flags
LLVMJITSymbolFlags Flags
Definition: Orc.h:103
LLVMOrcSymbolStringPoolEntryStr
const char * LLVMOrcSymbolStringPoolEntryStr(LLVMOrcSymbolStringPoolEntryRef S)
Definition: OrcV2CBindings.cpp:318
LLVMOrcSymbolLookupFlagsRequiredSymbol
@ LLVMOrcSymbolLookupFlagsRequiredSymbol
Definition: Orc.h:203
LLVMOrcCSymbolAliasMapPair
Represents a pair of a symbol name and SymbolAliasMapEntry.
Definition: Orc.h:137
LLVMOrcJITTargetAddress
LLVM_C_EXTERN_C_BEGIN typedef uint64_t LLVMOrcJITTargetAddress
Represents an address in the executor process.
Definition: Orc.h:39
LLVMOrcDisposeSymbols
void LLVMOrcDisposeSymbols(LLVMOrcSymbolStringPoolEntryRef *Symbols)
Disposes of the passed LLVMOrcSymbolStringPoolEntryRef* .
Definition: OrcV2CBindings.cpp:465
LLVMOrcExecutorAddress
uint64_t LLVMOrcExecutorAddress
Represents an address in the executor process.
Definition: Orc.h:44
LLVMOrcObjectTransformLayerTransformFunction
LLVMErrorRef(* LLVMOrcObjectTransformLayerTransformFunction)(void *Ctx, LLVMMemoryBufferRef *ObjInOut)
A function for applying transformations to an object file buffer.
Definition: Orc.h:418
LLVMOrcSymbolStringPoolRef
struct LLVMOrcOpaqueSymbolStringPool * LLVMOrcSymbolStringPoolRef
A reference to an orc::SymbolStringPool.
Definition: Orc.h:90
LLVMOrcDisposeMaterializationResponsibility
void LLVMOrcDisposeMaterializationResponsibility(LLVMOrcMaterializationResponsibilityRef MR)
Disposes of the passed MaterializationResponsibility object.
Definition: OrcV2CBindings.cpp:404
LLVMOrcIRTransformLayerEmit
void LLVMOrcIRTransformLayerEmit(LLVMOrcIRTransformLayerRef IRTransformLayer, LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcThreadSafeModuleRef TSM)
Definition: OrcV2CBindings.cpp:539
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
LLVMJITSymbolFlags
Represents the linkage flags for a symbol definition.
Definition: Orc.h:64
LLVMOrcJITDylibLookupFlags
LLVMOrcJITDylibLookupFlags
JITDylib lookup flags.
Definition: Orc.h:193
LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine
LLVMOrcJITTargetMachineBuilderRef LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine(LLVMTargetMachineRef TM)
Create a JITTargetMachineBuilder from the given TargetMachine template.
Definition: OrcV2CBindings.cpp:724
LLVMOrcDisposeDumpObjects
void LLVMOrcDisposeDumpObjects(LLVMOrcDumpObjectsRef DumpObjects)
Dispose of a DumpObjects instance.
Definition: OrcV2CBindings.cpp:827
LLVM_C_EXTERN_C_END
#define LLVM_C_EXTERN_C_END
Definition: ExternC.h:36
LLVMJITSymbolTargetFlags
uint8_t LLVMJITSymbolTargetFlags
Represents target specific flags for a symbol definition.
Definition: Orc.h:59
Error.h
LLVMOrcJITDylibGetDefaultResourceTracker
LLVMOrcResourceTrackerRef LLVMOrcJITDylibGetDefaultResourceTracker(LLVMOrcJITDylibRef JD)
Return a reference to the default resource tracker for the given JITDylib.
Definition: OrcV2CBindings.cpp:331
LLVMJITCSymbolMapPair::Name
LLVMOrcSymbolStringPoolEntryRef Name
Definition: Orc.h:116
LLVMOrcLookupKindDLSym
@ LLVMOrcLookupKindDLSym
Definition: Orc.h:184
LLVMOrcCreateNewThreadSafeModule
LLVMOrcThreadSafeModuleRef LLVMOrcCreateNewThreadSafeModule(LLVMModuleRef M, LLVMOrcThreadSafeContextRef TSCtx)
Create a ThreadSafeModule wrapper around the given LLVM module.
Definition: OrcV2CBindings.cpp:699
LLVMOrcExecutionSessionCreateBareJITDylib
LLVMOrcJITDylibRef LLVMOrcExecutionSessionCreateBareJITDylib(LLVMOrcExecutionSessionRef ES, const char *Name)
Create a "bare" JITDylib.
Definition: OrcV2CBindings.cpp:549
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
LLVMOrcReleaseResourceTracker
void LLVMOrcReleaseResourceTracker(LLVMOrcResourceTrackerRef RT)
Reduces the ref-count of a ResourceTracker.
Definition: OrcV2CBindings.cpp:337
LLVMErrorRef
struct LLVMOpaqueError * LLVMErrorRef
Opaque reference to an error instance.
Definition: Error.h:26
LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly
@ LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly
Definition: Orc.h:53
TargetMachine.h
LLVMOrcCDependenceMapPair::Names
LLVMOrcCSymbolsList Names
Definition: Orc.h:167
LLVMOrcObjectLayerRef
struct LLVMOrcOpaqueObjectLayer * LLVMOrcObjectLayerRef
A reference to an orc::ObjectLayer instance.
Definition: Orc.h:368
LLVMOrcSymbolLookupFlagsWeaklyReferencedSymbol
@ LLVMOrcSymbolLookupFlagsWeaklyReferencedSymbol
Definition: Orc.h:204
LLVMOrcIRTransformLayerTransformFunction
LLVMErrorRef(* LLVMOrcIRTransformLayerTransformFunction)(void *Ctx, LLVMOrcThreadSafeModuleRef *ModInOut, LLVMOrcMaterializationResponsibilityRef MR)
A function for applying transformations as part of an transform layer.
Definition: Orc.h:395
LLVMOrcObjectLayerAddObjectFile
LLVMErrorRef LLVMOrcObjectLayerAddObjectFile(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcJITDylibRef JD, LLVMMemoryBufferRef ObjBuffer)
Add an object to an ObjectLayer to the given JITDylib.
Definition: OrcV2CBindings.cpp:761
llvm::mca::SourceRef
std::pair< unsigned, const Instruction & > SourceRef
Definition: SourceMgr.h:26
LLVMOrcSymbolLookupFlags
LLVMOrcSymbolLookupFlags
Symbol lookup flags for lookup sets.
Definition: Orc.h:202
LLVMOrcGenericIRModuleOperationFunction
LLVMErrorRef(* LLVMOrcGenericIRModuleOperationFunction)(void *Ctx, LLVMModuleRef M)
A function for inspecting/mutating IR modules, suitable for use with LLVMOrcThreadSafeModuleWithModul...
Definition: Orc.h:356
LLVMOrcMaterializationResponsibilityReplace
LLVMErrorRef LLVMOrcMaterializationResponsibilityReplace(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcMaterializationUnitRef MU)
Transfers responsibility to the given MaterializationUnit for all symbols defined by that Materializa...
Definition: OrcV2CBindings.cpp:492
LLVMOrcCSymbolAliasMapEntry::Name
LLVMOrcSymbolStringPoolEntryRef Name
Definition: Orc.h:130
LLVMOrcMaterializationResponsibilityAddDependenciesForAll
void LLVMOrcMaterializationResponsibilityAddDependenciesForAll(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCDependenceMapPairs Dependencies, size_t NumPairs)
Adds dependencies to all symbols that the MaterializationResponsibility is responsible for.
Definition: OrcV2CBindings.cpp:526
LLVMOrcMaterializationResponsibilityGetSymbols
LLVMOrcCSymbolFlagsMapPairs LLVMOrcMaterializationResponsibilityGetSymbols(LLVMOrcMaterializationResponsibilityRef MR, size_t *NumPairs)
Returns the symbol flags map for this responsibility instance.
Definition: OrcV2CBindings.cpp:420
LLVMOrcErrorReporterFunction
void(* LLVMOrcErrorReporterFunction)(void *Ctx, LLVMErrorRef Err)
Error reporter function.
Definition: Orc.h:85
LLVM_C_EXTERN_C_BEGIN
#define LLVM_C_EXTERN_C_BEGIN
Definition: ExternC.h:35
LLVMJITCSymbolMapPair::Sym
LLVMJITEvaluatedSymbol Sym
Definition: Orc.h:117
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:79
LLVMOrcAbsoluteSymbols
LLVMOrcMaterializationUnitRef LLVMOrcAbsoluteSymbols(LLVMOrcCSymbolMapPairs Syms, size_t NumPairs)
Create a MaterializationUnit to define the given symbols as pointing to the corresponding raw address...
Definition: OrcV2CBindings.cpp:379
LLVMOrcCreateDumpObjects
LLVMOrcDumpObjectsRef LLVMOrcCreateDumpObjects(const char *DumpDir, const char *IdentifierOverride)
Create a DumpObjects instance.
Definition: OrcV2CBindings.cpp:820
LLVMOrcExecutionSessionSetErrorReporter
void LLVMOrcExecutionSessionSetErrorReporter(LLVMOrcExecutionSessionRef ES, LLVMOrcErrorReporterFunction ReportError, void *Ctx)
Attach a custom error reporter function to the ExecutionSession.
Definition: OrcV2CBindings.cpp:287
LLVMOrcDisposeLazyCallThroughManager
void LLVMOrcDisposeLazyCallThroughManager(LLVMOrcLazyCallThroughManagerRef LCTM)
Dispose of an LazyCallThroughManager.
Definition: OrcV2CBindings.cpp:1015
LLVMJITSymbolGenericFlagsCallable
@ LLVMJITSymbolGenericFlagsCallable
Definition: Orc.h:52
LLVMOrcThreadSafeModuleRef
struct LLVMOrcOpaqueThreadSafeModule * LLVMOrcThreadSafeModuleRef
A reference to an orc::ThreadSafeModule instance.
Definition: Orc.h:350
LLVMOrcCSymbolsList
Represents a list of LLVMOrcSymbolStringPoolEntryRef and the associated length.
Definition: Orc.h:157
LLVMJITSymbolFlags::GenericFlags
uint8_t GenericFlags
Definition: Orc.h:65
LLVMOrcDisposeIndirectStubsManager
void LLVMOrcDisposeIndirectStubsManager(LLVMOrcIndirectStubsManagerRef ISM)
Dispose of an IndirectStubsManager.
Definition: OrcV2CBindings.cpp:998
LLVMOrcLookupKind
LLVMOrcLookupKind
Lookup kind.
Definition: Orc.h:182
LLVMOrcLookupStateRef
struct LLVMOrcOpaqueLookupState * LLVMOrcLookupStateRef
An opaque lookup state object.
Definition: Orc.h:295
LLVMOrcCLookupSetElement::LookupFlags
LLVMOrcSymbolLookupFlags LookupFlags
Definition: Orc.h:212
LLVMMemoryBufferRef
struct LLVMOpaqueMemoryBuffer * LLVMMemoryBufferRef
LLVM uses a polymorphic type hierarchy which C cannot represent, therefore parameters must be passed ...
Definition: Types.h:48
LLVMOrcExecutionSessionRef
struct LLVMOrcOpaqueExecutionSession * LLVMOrcExecutionSessionRef
A reference to an orc::ExecutionSession instance.
Definition: Orc.h:80
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
LLVMOrcIRTransformLayerRef
struct LLVMOrcOpaqueIRTransformLayer * LLVMOrcIRTransformLayerRef
A reference to an orc::IRTransformLayer instance.
Definition: Orc.h:378
LLVMOrcThreadSafeModuleWithModuleDo
LLVMErrorRef LLVMOrcThreadSafeModuleWithModuleDo(LLVMOrcThreadSafeModuleRef TSM, LLVMOrcGenericIRModuleOperationFunction F, void *Ctx)
Apply the given function to the module contained in this ThreadSafeModule.
Definition: OrcV2CBindings.cpp:691
LLVMOrcThreadSafeContextRef
struct LLVMOrcOpaqueThreadSafeContext * LLVMOrcThreadSafeContextRef
A reference to an orc::ThreadSafeContext instance.
Definition: Orc.h:345
LLVMOrcMaterializationResponsibilityGetRequestedSymbols
LLVMOrcSymbolStringPoolEntryRef * LLVMOrcMaterializationResponsibilityGetRequestedSymbols(LLVMOrcMaterializationResponsibilityRef MR, size_t *NumSymbols)
Returns the names of any symbols covered by this MaterializationResponsibility object that have queri...
Definition: OrcV2CBindings.cpp:449
LLVMOrcMaterializationUnitRef
struct LLVMOrcOpaqueMaterializationUnit * LLVMOrcMaterializationUnitRef
A reference to a uniquely owned orc::MaterializationUnit instance.
Definition: Orc.h:231
LLVMOrcCLookupSetElement::Name
LLVMOrcSymbolStringPoolEntryRef Name
Definition: Orc.h:211
LLVMOrcCLookupSet
LLVMOrcCLookupSetElement * LLVMOrcCLookupSet
A set of symbols to look up / generate.
Definition: Orc.h:226
LLVMOrcCreateCustomMaterializationUnit
LLVMOrcMaterializationUnitRef LLVMOrcCreateCustomMaterializationUnit(const char *Name, void *Ctx, LLVMOrcCSymbolFlagsMapPairs Syms, size_t NumSyms, LLVMOrcSymbolStringPoolEntryRef InitSym, LLVMOrcMaterializationUnitMaterializeFunction Materialize, LLVMOrcMaterializationUnitDiscardFunction Discard, LLVMOrcMaterializationUnitDestroyFunction Destroy)
Create a custom MaterializationUnit.
Definition: OrcV2CBindings.cpp:361
LLVMOrcMaterializationUnitDiscardFunction
void(* LLVMOrcMaterializationUnitDiscardFunction)(void *Ctx, LLVMOrcJITDylibRef JD, LLVMOrcSymbolStringPoolEntryRef Symbol)
A MaterializationUnit discard callback.
Definition: Orc.h:260
LLVMJITCSymbolMapPair
Represents a pair of a symbol name and an evaluated symbol.
Definition: Orc.h:115
LLVMOrcObjectTransformLayerRef
struct LLVMOrcOpaqueObjectTransformLayer * LLVMOrcObjectTransformLayerRef
A reference to an orc::ObjectTransformLayer instance.
Definition: Orc.h:402
LLVMJITSymbolFlags::TargetFlags
uint8_t TargetFlags
Definition: Orc.h:66
LLVMOrcMaterializationResponsibilityDefineMaterializing
LLVMErrorRef LLVMOrcMaterializationResponsibilityDefineMaterializing(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCSymbolFlagsMapPairs Pairs, size_t NumPairs)
Attempt to claim responsibility for new definitions.
Definition: OrcV2CBindings.cpp:481
LLVMOrcJITDylibAddGenerator
void LLVMOrcJITDylibAddGenerator(LLVMOrcJITDylibRef JD, LLVMOrcDefinitionGeneratorRef DG)
Add a DefinitionGenerator to the given JITDylib.
Definition: OrcV2CBindings.cpp:586
LLVMModuleRef
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
Definition: Types.h:61
LLVMOrcIndirectStubsManagerRef
struct LLVMOrcOpaqueIndirectStubsManager * LLVMOrcIndirectStubsManagerRef
A reference to an orc::IndirectStubsManager instance.
Definition: Orc.h:424