aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/include/llvm-c
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/include/llvm-c
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm-c')
-rw-r--r--contrib/libs/llvm12/include/llvm-c/Core.h108
-rw-r--r--contrib/libs/llvm12/include/llvm-c/DebugInfo.h6
-rw-r--r--contrib/libs/llvm12/include/llvm-c/Error.h10
-rw-r--r--contrib/libs/llvm12/include/llvm-c/LLJIT.h448
-rw-r--r--contrib/libs/llvm12/include/llvm-c/Orc.h680
-rw-r--r--contrib/libs/llvm12/include/llvm-c/OrcEE.h132
-rw-r--r--contrib/libs/llvm12/include/llvm-c/Transforms/Scalar.h6
7 files changed, 695 insertions, 695 deletions
diff --git a/contrib/libs/llvm12/include/llvm-c/Core.h b/contrib/libs/llvm12/include/llvm-c/Core.h
index cc24024524..788bc9997b 100644
--- a/contrib/libs/llvm12/include/llvm-c/Core.h
+++ b/contrib/libs/llvm12/include/llvm-c/Core.h
@@ -169,8 +169,8 @@ typedef enum {
LLVMX86_MMXTypeKind, /**< X86 MMX */
LLVMTokenTypeKind, /**< Tokens */
LLVMScalableVectorTypeKind, /**< Scalable SIMD vector type */
- LLVMBFloatTypeKind, /**< 16 bit brain floating point type */
- LLVMX86_AMXTypeKind /**< X86 AMX */
+ LLVMBFloatTypeKind, /**< 16 bit brain floating point type */
+ LLVMX86_AMXTypeKind /**< X86 AMX */
} LLVMTypeKind;
typedef enum {
@@ -289,7 +289,7 @@ typedef enum {
LLVMInlineAsmValueKind,
LLVMInstructionValueKind,
- LLVMPoisonValueValueKind
+ LLVMPoisonValueValueKind
} LLVMValueKind;
typedef enum {
@@ -612,17 +612,17 @@ unsigned LLVMGetEnumAttributeKind(LLVMAttributeRef A);
uint64_t LLVMGetEnumAttributeValue(LLVMAttributeRef A);
/**
- * Create a type attribute
- */
-LLVMAttributeRef LLVMCreateTypeAttribute(LLVMContextRef C, unsigned KindID,
- LLVMTypeRef type_ref);
-
-/**
- * Get the type attribute's value.
- */
-LLVMTypeRef LLVMGetTypeAttributeValue(LLVMAttributeRef A);
-
-/**
+ * Create a type attribute
+ */
+LLVMAttributeRef LLVMCreateTypeAttribute(LLVMContextRef C, unsigned KindID,
+ LLVMTypeRef type_ref);
+
+/**
+ * Get the type attribute's value.
+ */
+LLVMTypeRef LLVMGetTypeAttributeValue(LLVMAttributeRef A);
+
+/**
* Create a string attribute.
*/
LLVMAttributeRef LLVMCreateStringAttribute(LLVMContextRef C,
@@ -644,14 +644,14 @@ const char *LLVMGetStringAttributeValue(LLVMAttributeRef A, unsigned *Length);
*/
LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A);
LLVMBool LLVMIsStringAttribute(LLVMAttributeRef A);
-LLVMBool LLVMIsTypeAttribute(LLVMAttributeRef A);
+LLVMBool LLVMIsTypeAttribute(LLVMAttributeRef A);
+
+/**
+ * Obtain a Type from a context by its registered name.
+ */
+LLVMTypeRef LLVMGetTypeByName2(LLVMContextRef C, const char *Name);
/**
- * Obtain a Type from a context by its registered name.
- */
-LLVMTypeRef LLVMGetTypeByName2(LLVMContextRef C, const char *Name);
-
-/**
* @}
*/
@@ -892,7 +892,7 @@ LLVMValueRef LLVMGetInlineAsm(LLVMTypeRef Ty,
*/
LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M);
-/** Deprecated: Use LLVMGetTypeByName2 instead. */
+/** Deprecated: Use LLVMGetTypeByName2 instead. */
LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name);
/**
@@ -1468,22 +1468,22 @@ unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy);
LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount);
/**
- * Create a vector type that contains a defined type and has a scalable
- * number of elements.
+ * Create a vector type that contains a defined type and has a scalable
+ * number of elements.
*
- * The created type will exist in the context thats its element type
- * exists in.
+ * The created type will exist in the context thats its element type
+ * exists in.
+ *
+ * @see llvm::ScalableVectorType::get()
+ */
+LLVMTypeRef LLVMScalableVectorType(LLVMTypeRef ElementType,
+ unsigned ElementCount);
+
+/**
+ * Obtain the (possibly scalable) number of elements in a vector type.
+ *
+ * This only works on types that represent vectors (fixed or scalable).
*
- * @see llvm::ScalableVectorType::get()
- */
-LLVMTypeRef LLVMScalableVectorType(LLVMTypeRef ElementType,
- unsigned ElementCount);
-
-/**
- * Obtain the (possibly scalable) number of elements in a vector type.
- *
- * This only works on types that represent vectors (fixed or scalable).
- *
* @see llvm::VectorType::getNumElements()
*/
unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy);
@@ -1514,11 +1514,11 @@ LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C);
LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C);
/**
- * Create a X86 AMX type in a context.
- */
-LLVMTypeRef LLVMX86AMXTypeInContext(LLVMContextRef C);
-
-/**
+ * Create a X86 AMX type in a context.
+ */
+LLVMTypeRef LLVMX86AMXTypeInContext(LLVMContextRef C);
+
+/**
* Create a token type in a context.
*/
LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C);
@@ -1535,7 +1535,7 @@ LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C);
LLVMTypeRef LLVMVoidType(void);
LLVMTypeRef LLVMLabelType(void);
LLVMTypeRef LLVMX86MMXType(void);
-LLVMTypeRef LLVMX86AMXType(void);
+LLVMTypeRef LLVMX86AMXType(void);
/**
* @}
@@ -1592,7 +1592,7 @@ LLVMTypeRef LLVMX86AMXType(void);
macro(Function) \
macro(GlobalVariable) \
macro(UndefValue) \
- macro(PoisonValue) \
+ macro(PoisonValue) \
macro(Instruction) \
macro(UnaryOperator) \
macro(BinaryOperator) \
@@ -1727,11 +1727,11 @@ LLVMBool LLVMIsConstant(LLVMValueRef Val);
LLVMBool LLVMIsUndef(LLVMValueRef Val);
/**
- * Determine whether a value instance is poisonous.
- */
-LLVMBool LLVMIsPoison(LLVMValueRef Val);
-
-/**
+ * Determine whether a value instance is poisonous.
+ */
+LLVMBool LLVMIsPoison(LLVMValueRef Val);
+
+/**
* Convert value instances between types.
*
* Internally, an LLVMValueRef is "pinned" to a specific type. This
@@ -1890,13 +1890,13 @@ LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty);
LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty);
/**
- * Obtain a constant value referring to a poison value of a type.
- *
- * @see llvm::PoisonValue::get()
- */
-LLVMValueRef LLVMGetPoison(LLVMTypeRef Ty);
-
-/**
+ * Obtain a constant value referring to a poison value of a type.
+ *
+ * @see llvm::PoisonValue::get()
+ */
+LLVMValueRef LLVMGetPoison(LLVMTypeRef Ty);
+
+/**
* Determine whether a value instance is null.
*
* @see llvm::Constant::isNullValue()
diff --git a/contrib/libs/llvm12/include/llvm-c/DebugInfo.h b/contrib/libs/llvm12/include/llvm-c/DebugInfo.h
index 5ae7ea139e..d4382ec4fb 100644
--- a/contrib/libs/llvm12/include/llvm-c/DebugInfo.h
+++ b/contrib/libs/llvm12/include/llvm-c/DebugInfo.h
@@ -166,9 +166,9 @@ enum {
LLVMDIImportedEntityMetadataKind,
LLVMDIMacroMetadataKind,
LLVMDIMacroFileMetadataKind,
- LLVMDICommonBlockMetadataKind,
- LLVMDIStringTypeMetadataKind,
- LLVMDIGenericSubrangeMetadataKind
+ LLVMDICommonBlockMetadataKind,
+ LLVMDIStringTypeMetadataKind,
+ LLVMDIGenericSubrangeMetadataKind
};
typedef unsigned LLVMMetadataKind;
diff --git a/contrib/libs/llvm12/include/llvm-c/Error.h b/contrib/libs/llvm12/include/llvm-c/Error.h
index b56951cfea..5e33613bd8 100644
--- a/contrib/libs/llvm12/include/llvm-c/Error.h
+++ b/contrib/libs/llvm12/include/llvm-c/Error.h
@@ -69,11 +69,11 @@ void LLVMDisposeErrorMessage(char *ErrMsg);
*/
LLVMErrorTypeId LLVMGetStringErrorTypeId(void);
-/**
- * Create a StringError.
- */
-LLVMErrorRef LLVMCreateStringError(const char *ErrMsg);
-
+/**
+ * Create a StringError.
+ */
+LLVMErrorRef LLVMCreateStringError(const char *ErrMsg);
+
LLVM_C_EXTERN_C_END
#endif
diff --git a/contrib/libs/llvm12/include/llvm-c/LLJIT.h b/contrib/libs/llvm12/include/llvm-c/LLJIT.h
index 2e0094fa5a..e92c772dd0 100644
--- a/contrib/libs/llvm12/include/llvm-c/LLJIT.h
+++ b/contrib/libs/llvm12/include/llvm-c/LLJIT.h
@@ -1,224 +1,224 @@
-#pragma once
-
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#endif
-
-/*===----------- llvm-c/LLJIT.h - OrcV2 LLJIT C bindings --------*- C++ -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This header declares the C interface to the LLJIT class in *|
-|* libLLVMOrcJIT.a, which provides a simple MCJIT-like ORC JIT. *|
-|* *|
-|* Many exotic languages can interoperate with C code but have a harder time *|
-|* with C++ due to name mangling. So in addition to C, this interface enables *|
-|* tools written in such languages. *|
-|* *|
-|* Note: This interface is experimental. It is *NOT* stable, and may be *|
-|* changed without warning. Only C API usage documentation is *|
-|* provided. See the C++ documentation for all higher level ORC API *|
-|* details. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_C_LLJIT_H
-#define LLVM_C_LLJIT_H
-
-#include "llvm-c/Error.h"
-#include "llvm-c/Orc.h"
-#include "llvm-c/TargetMachine.h"
-#include "llvm-c/Types.h"
-
-LLVM_C_EXTERN_C_BEGIN
-
-/**
- * A function for constructing an ObjectLinkingLayer instance to be used
- * by an LLJIT instance.
- *
- * Clients can call LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator to
- * set the creator function to use when constructing an LLJIT instance.
- * This can be used to override the default linking layer implementation
- * that would otherwise be chosen by LLJITBuilder.
- *
- * Object linking layers returned by this function will become owned by the
- * LLJIT instance. The client is not responsible for managing their lifetimes
- * after the function returns.
- */
-typedef LLVMOrcObjectLayerRef (
- *LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction)(
- void *Ctx, LLVMOrcExecutionSessionRef ES, const char *Triple);
-
-/**
- * A reference to an orc::LLJITBuilder instance.
- */
-typedef struct LLVMOrcOpaqueLLJITBuilder *LLVMOrcLLJITBuilderRef;
-
-/**
- * A reference to an orc::LLJIT instance.
- */
-typedef struct LLVMOrcOpaqueLLJIT *LLVMOrcLLJITRef;
-
-/**
- * Create an LLVMOrcLLJITBuilder.
- *
- * The client owns the resulting LLJITBuilder and should dispose of it using
- * LLVMOrcDisposeLLJITBuilder once they are done with it.
- */
-LLVMOrcLLJITBuilderRef LLVMOrcCreateLLJITBuilder(void);
-
-/**
- * Dispose of an LLVMOrcLLJITBuilderRef. This should only be called if ownership
- * has not been passed to LLVMOrcCreateLLJIT (e.g. because some error prevented
- * that function from being called).
- */
-void LLVMOrcDisposeLLJITBuilder(LLVMOrcLLJITBuilderRef Builder);
-
-/**
- * Set the JITTargetMachineBuilder to be used when constructing the LLJIT
- * instance. Calling this function is optional: if it is not called then the
- * LLJITBuilder will use JITTargeTMachineBuilder::detectHost to construct a
- * JITTargetMachineBuilder.
- */
-void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder(
- LLVMOrcLLJITBuilderRef Builder, LLVMOrcJITTargetMachineBuilderRef JTMB);
-
-/**
- * Set an ObjectLinkingLayer creator function for this LLJIT instance.
- */
-void LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(
- LLVMOrcLLJITBuilderRef Builder,
- LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction F, void *Ctx);
-
-/**
- * Create an LLJIT instance from an LLJITBuilder.
- *
- * This operation takes ownership of the Builder argument: clients should not
- * dispose of the builder after calling this function (even if the function
- * returns an error). If a null Builder argument is provided then a
- * default-constructed LLJITBuilder will be used.
- *
- * On success the resulting LLJIT instance is uniquely owned by the client and
- * automatically manages the memory of all JIT'd code and all modules that are
- * transferred to it (e.g. via LLVMOrcLLJITAddLLVMIRModule). Disposing of the
- * LLJIT instance will free all memory managed by the JIT, including JIT'd code
- * and not-yet compiled modules.
- */
-LLVMErrorRef LLVMOrcCreateLLJIT(LLVMOrcLLJITRef *Result,
- LLVMOrcLLJITBuilderRef Builder);
-
-/**
- * Dispose of an LLJIT instance.
- */
-LLVMErrorRef LLVMOrcDisposeLLJIT(LLVMOrcLLJITRef J);
-
-/**
- * Get a reference to the ExecutionSession for this LLJIT instance.
- *
- * The ExecutionSession is owned by the LLJIT instance. The client is not
- * responsible for managing its memory.
- */
-LLVMOrcExecutionSessionRef LLVMOrcLLJITGetExecutionSession(LLVMOrcLLJITRef J);
-
-/**
- * Return a reference to the Main JITDylib.
- *
- * The JITDylib is owned by the LLJIT instance. The client is not responsible
- * for managing its memory.
- */
-LLVMOrcJITDylibRef LLVMOrcLLJITGetMainJITDylib(LLVMOrcLLJITRef J);
-
-/**
- * Return the target triple for this LLJIT instance. This string is owned by
- * the LLJIT instance and should not be freed by the client.
- */
-const char *LLVMOrcLLJITGetTripleString(LLVMOrcLLJITRef J);
-
-/**
- * Returns the global prefix character according to the LLJIT's DataLayout.
- */
-char LLVMOrcLLJITGetGlobalPrefix(LLVMOrcLLJITRef J);
-
-/**
- * Mangles the given string according to the LLJIT instance's DataLayout, then
- * interns the result in the SymbolStringPool and returns a reference to the
- * pool entry. Clients should call LLVMOrcReleaseSymbolStringPoolEntry to
- * decrement the ref-count on the pool entry once they are finished with this
- * value.
- */
-LLVMOrcSymbolStringPoolEntryRef
-LLVMOrcLLJITMangleAndIntern(LLVMOrcLLJITRef J, const char *UnmangledName);
-
-/**
- * Add a buffer representing an object file to the given JITDylib in the given
- * LLJIT instance. This operation transfers ownership of the buffer to the
- * LLJIT instance. The buffer should not be disposed of or referenced once this
- * function returns.
- *
- * Resources associated with the given object will be tracked by the given
- * JITDylib's default resource tracker.
- */
-LLVMErrorRef LLVMOrcLLJITAddObjectFile(LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD,
- LLVMMemoryBufferRef ObjBuffer);
-
-/**
- * Add a buffer representing an object file to the given ResourceTracker's
- * JITDylib in the given LLJIT instance. This operation transfers ownership of
- * the buffer to the LLJIT instance. The buffer should not be disposed of or
- * referenced once this function returns.
- *
- * Resources associated with the given object will be tracked by ResourceTracker
- * RT.
- */
-LLVMErrorRef LLVMOrcLLJITAddObjectFileWithRT(LLVMOrcLLJITRef J,
- LLVMOrcResourceTrackerRef RT,
- LLVMMemoryBufferRef ObjBuffer);
-
-/**
- * Add an IR module to the given JITDylib in the given LLJIT instance. This
- * operation transfers ownership of the TSM argument to the LLJIT instance.
- * The TSM argument should not be disposed of or referenced once this
- * function returns.
- *
- * Resources associated with the given Module will be tracked by the given
- * JITDylib's default resource tracker.
- */
-LLVMErrorRef LLVMOrcLLJITAddLLVMIRModule(LLVMOrcLLJITRef J,
- LLVMOrcJITDylibRef JD,
- LLVMOrcThreadSafeModuleRef TSM);
-
-/**
- * Add an IR module to the given ResourceTracker's JITDylib in the given LLJIT
- * instance. This operation transfers ownership of the TSM argument to the LLJIT
- * instance. The TSM argument should not be disposed of or referenced once this
- * function returns.
- *
- * Resources associated with the given Module will be tracked by ResourceTracker
- * RT.
- */
-LLVMErrorRef LLVMOrcLLJITAddLLVMIRModuleWithRT(LLVMOrcLLJITRef J,
- LLVMOrcResourceTrackerRef JD,
- LLVMOrcThreadSafeModuleRef TSM);
-
-/**
- * Look up the given symbol in the main JITDylib of the given LLJIT instance.
- *
- * This operation does not take ownership of the Name argument.
- */
-LLVMErrorRef LLVMOrcLLJITLookup(LLVMOrcLLJITRef J,
- LLVMOrcJITTargetAddress *Result,
- const char *Name);
-
-LLVM_C_EXTERN_C_END
-
-#endif /* LLVM_C_LLJIT_H */
-
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+#pragma once
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
+/*===----------- llvm-c/LLJIT.h - OrcV2 LLJIT C bindings --------*- C++ -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This header declares the C interface to the LLJIT class in *|
+|* libLLVMOrcJIT.a, which provides a simple MCJIT-like ORC JIT. *|
+|* *|
+|* Many exotic languages can interoperate with C code but have a harder time *|
+|* with C++ due to name mangling. So in addition to C, this interface enables *|
+|* tools written in such languages. *|
+|* *|
+|* Note: This interface is experimental. It is *NOT* stable, and may be *|
+|* changed without warning. Only C API usage documentation is *|
+|* provided. See the C++ documentation for all higher level ORC API *|
+|* details. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_C_LLJIT_H
+#define LLVM_C_LLJIT_H
+
+#include "llvm-c/Error.h"
+#include "llvm-c/Orc.h"
+#include "llvm-c/TargetMachine.h"
+#include "llvm-c/Types.h"
+
+LLVM_C_EXTERN_C_BEGIN
+
+/**
+ * A function for constructing an ObjectLinkingLayer instance to be used
+ * by an LLJIT instance.
+ *
+ * Clients can call LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator to
+ * set the creator function to use when constructing an LLJIT instance.
+ * This can be used to override the default linking layer implementation
+ * that would otherwise be chosen by LLJITBuilder.
+ *
+ * Object linking layers returned by this function will become owned by the
+ * LLJIT instance. The client is not responsible for managing their lifetimes
+ * after the function returns.
+ */
+typedef LLVMOrcObjectLayerRef (
+ *LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction)(
+ void *Ctx, LLVMOrcExecutionSessionRef ES, const char *Triple);
+
+/**
+ * A reference to an orc::LLJITBuilder instance.
+ */
+typedef struct LLVMOrcOpaqueLLJITBuilder *LLVMOrcLLJITBuilderRef;
+
+/**
+ * A reference to an orc::LLJIT instance.
+ */
+typedef struct LLVMOrcOpaqueLLJIT *LLVMOrcLLJITRef;
+
+/**
+ * Create an LLVMOrcLLJITBuilder.
+ *
+ * The client owns the resulting LLJITBuilder and should dispose of it using
+ * LLVMOrcDisposeLLJITBuilder once they are done with it.
+ */
+LLVMOrcLLJITBuilderRef LLVMOrcCreateLLJITBuilder(void);
+
+/**
+ * Dispose of an LLVMOrcLLJITBuilderRef. This should only be called if ownership
+ * has not been passed to LLVMOrcCreateLLJIT (e.g. because some error prevented
+ * that function from being called).
+ */
+void LLVMOrcDisposeLLJITBuilder(LLVMOrcLLJITBuilderRef Builder);
+
+/**
+ * Set the JITTargetMachineBuilder to be used when constructing the LLJIT
+ * instance. Calling this function is optional: if it is not called then the
+ * LLJITBuilder will use JITTargeTMachineBuilder::detectHost to construct a
+ * JITTargetMachineBuilder.
+ */
+void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder(
+ LLVMOrcLLJITBuilderRef Builder, LLVMOrcJITTargetMachineBuilderRef JTMB);
+
+/**
+ * Set an ObjectLinkingLayer creator function for this LLJIT instance.
+ */
+void LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(
+ LLVMOrcLLJITBuilderRef Builder,
+ LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction F, void *Ctx);
+
+/**
+ * Create an LLJIT instance from an LLJITBuilder.
+ *
+ * This operation takes ownership of the Builder argument: clients should not
+ * dispose of the builder after calling this function (even if the function
+ * returns an error). If a null Builder argument is provided then a
+ * default-constructed LLJITBuilder will be used.
+ *
+ * On success the resulting LLJIT instance is uniquely owned by the client and
+ * automatically manages the memory of all JIT'd code and all modules that are
+ * transferred to it (e.g. via LLVMOrcLLJITAddLLVMIRModule). Disposing of the
+ * LLJIT instance will free all memory managed by the JIT, including JIT'd code
+ * and not-yet compiled modules.
+ */
+LLVMErrorRef LLVMOrcCreateLLJIT(LLVMOrcLLJITRef *Result,
+ LLVMOrcLLJITBuilderRef Builder);
+
+/**
+ * Dispose of an LLJIT instance.
+ */
+LLVMErrorRef LLVMOrcDisposeLLJIT(LLVMOrcLLJITRef J);
+
+/**
+ * Get a reference to the ExecutionSession for this LLJIT instance.
+ *
+ * The ExecutionSession is owned by the LLJIT instance. The client is not
+ * responsible for managing its memory.
+ */
+LLVMOrcExecutionSessionRef LLVMOrcLLJITGetExecutionSession(LLVMOrcLLJITRef J);
+
+/**
+ * Return a reference to the Main JITDylib.
+ *
+ * The JITDylib is owned by the LLJIT instance. The client is not responsible
+ * for managing its memory.
+ */
+LLVMOrcJITDylibRef LLVMOrcLLJITGetMainJITDylib(LLVMOrcLLJITRef J);
+
+/**
+ * Return the target triple for this LLJIT instance. This string is owned by
+ * the LLJIT instance and should not be freed by the client.
+ */
+const char *LLVMOrcLLJITGetTripleString(LLVMOrcLLJITRef J);
+
+/**
+ * Returns the global prefix character according to the LLJIT's DataLayout.
+ */
+char LLVMOrcLLJITGetGlobalPrefix(LLVMOrcLLJITRef J);
+
+/**
+ * Mangles the given string according to the LLJIT instance's DataLayout, then
+ * interns the result in the SymbolStringPool and returns a reference to the
+ * pool entry. Clients should call LLVMOrcReleaseSymbolStringPoolEntry to
+ * decrement the ref-count on the pool entry once they are finished with this
+ * value.
+ */
+LLVMOrcSymbolStringPoolEntryRef
+LLVMOrcLLJITMangleAndIntern(LLVMOrcLLJITRef J, const char *UnmangledName);
+
+/**
+ * Add a buffer representing an object file to the given JITDylib in the given
+ * LLJIT instance. This operation transfers ownership of the buffer to the
+ * LLJIT instance. The buffer should not be disposed of or referenced once this
+ * function returns.
+ *
+ * Resources associated with the given object will be tracked by the given
+ * JITDylib's default resource tracker.
+ */
+LLVMErrorRef LLVMOrcLLJITAddObjectFile(LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD,
+ LLVMMemoryBufferRef ObjBuffer);
+
+/**
+ * Add a buffer representing an object file to the given ResourceTracker's
+ * JITDylib in the given LLJIT instance. This operation transfers ownership of
+ * the buffer to the LLJIT instance. The buffer should not be disposed of or
+ * referenced once this function returns.
+ *
+ * Resources associated with the given object will be tracked by ResourceTracker
+ * RT.
+ */
+LLVMErrorRef LLVMOrcLLJITAddObjectFileWithRT(LLVMOrcLLJITRef J,
+ LLVMOrcResourceTrackerRef RT,
+ LLVMMemoryBufferRef ObjBuffer);
+
+/**
+ * Add an IR module to the given JITDylib in the given LLJIT instance. This
+ * operation transfers ownership of the TSM argument to the LLJIT instance.
+ * The TSM argument should not be disposed of or referenced once this
+ * function returns.
+ *
+ * Resources associated with the given Module will be tracked by the given
+ * JITDylib's default resource tracker.
+ */
+LLVMErrorRef LLVMOrcLLJITAddLLVMIRModule(LLVMOrcLLJITRef J,
+ LLVMOrcJITDylibRef JD,
+ LLVMOrcThreadSafeModuleRef TSM);
+
+/**
+ * Add an IR module to the given ResourceTracker's JITDylib in the given LLJIT
+ * instance. This operation transfers ownership of the TSM argument to the LLJIT
+ * instance. The TSM argument should not be disposed of or referenced once this
+ * function returns.
+ *
+ * Resources associated with the given Module will be tracked by ResourceTracker
+ * RT.
+ */
+LLVMErrorRef LLVMOrcLLJITAddLLVMIRModuleWithRT(LLVMOrcLLJITRef J,
+ LLVMOrcResourceTrackerRef JD,
+ LLVMOrcThreadSafeModuleRef TSM);
+
+/**
+ * Look up the given symbol in the main JITDylib of the given LLJIT instance.
+ *
+ * This operation does not take ownership of the Name argument.
+ */
+LLVMErrorRef LLVMOrcLLJITLookup(LLVMOrcLLJITRef J,
+ LLVMOrcJITTargetAddress *Result,
+ const char *Name);
+
+LLVM_C_EXTERN_C_END
+
+#endif /* LLVM_C_LLJIT_H */
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
diff --git a/contrib/libs/llvm12/include/llvm-c/Orc.h b/contrib/libs/llvm12/include/llvm-c/Orc.h
index 0a0d4d18c7..b05fde6838 100644
--- a/contrib/libs/llvm12/include/llvm-c/Orc.h
+++ b/contrib/libs/llvm12/include/llvm-c/Orc.h
@@ -46,200 +46,200 @@ LLVM_C_EXTERN_C_BEGIN
typedef uint64_t LLVMOrcJITTargetAddress;
/**
- * Represents generic linkage flags for a symbol definition.
- */
-typedef enum {
- LLVMJITSymbolGenericFlagsExported = 1U << 0,
- LLVMJITSymbolGenericFlagsWeak = 1U << 1
-} LLVMJITSymbolGenericFlags;
-
-/**
- * Represents target specific flags for a symbol definition.
- */
-typedef uint8_t LLVMJITTargetSymbolFlags;
-
-/**
- * Represents the linkage flags for a symbol definition.
- */
-typedef struct {
- uint8_t GenericFlags;
- uint8_t TargetFlags;
-} LLVMJITSymbolFlags;
-
-/**
- * Represents an evaluated symbol address and flags.
- */
-typedef struct {
- LLVMOrcJITTargetAddress Address;
- LLVMJITSymbolFlags Flags;
-} LLVMJITEvaluatedSymbol;
-
-/**
+ * Represents generic linkage flags for a symbol definition.
+ */
+typedef enum {
+ LLVMJITSymbolGenericFlagsExported = 1U << 0,
+ LLVMJITSymbolGenericFlagsWeak = 1U << 1
+} LLVMJITSymbolGenericFlags;
+
+/**
+ * Represents target specific flags for a symbol definition.
+ */
+typedef uint8_t LLVMJITTargetSymbolFlags;
+
+/**
+ * Represents the linkage flags for a symbol definition.
+ */
+typedef struct {
+ uint8_t GenericFlags;
+ uint8_t TargetFlags;
+} LLVMJITSymbolFlags;
+
+/**
+ * Represents an evaluated symbol address and flags.
+ */
+typedef struct {
+ LLVMOrcJITTargetAddress Address;
+ LLVMJITSymbolFlags Flags;
+} LLVMJITEvaluatedSymbol;
+
+/**
* A reference to an orc::ExecutionSession instance.
*/
typedef struct LLVMOrcOpaqueExecutionSession *LLVMOrcExecutionSessionRef;
/**
- * Error reporter function.
- */
-typedef void (*LLVMOrcErrorReporterFunction)(void *Ctx, LLVMErrorRef Err);
-
-/**
- * A reference to an orc::SymbolStringPool.
- */
-typedef struct LLVMOrcOpaqueSymbolStringPool *LLVMOrcSymbolStringPoolRef;
-
-/**
+ * Error reporter function.
+ */
+typedef void (*LLVMOrcErrorReporterFunction)(void *Ctx, LLVMErrorRef Err);
+
+/**
+ * A reference to an orc::SymbolStringPool.
+ */
+typedef struct LLVMOrcOpaqueSymbolStringPool *LLVMOrcSymbolStringPoolRef;
+
+/**
* A reference to an orc::SymbolStringPool table entry.
*/
-typedef struct LLVMOrcOpaqueSymbolStringPoolEntry
+typedef struct LLVMOrcOpaqueSymbolStringPoolEntry
*LLVMOrcSymbolStringPoolEntryRef;
/**
- * Represents a pair of a symbol name and an evaluated symbol.
- */
-typedef struct {
- LLVMOrcSymbolStringPoolEntryRef Name;
- LLVMJITEvaluatedSymbol Sym;
-} LLVMJITCSymbolMapPair;
-
-/**
- * Represents a list of (SymbolStringPtr, JITEvaluatedSymbol) pairs that can be
- * used to construct a SymbolMap.
- */
-typedef LLVMJITCSymbolMapPair *LLVMOrcCSymbolMapPairs;
-
-/**
- * Lookup kind. This can be used by definition generators when deciding whether
- * to produce a definition for a requested symbol.
- *
- * This enum should be kept in sync with llvm::orc::LookupKind.
- */
-typedef enum {
- LLVMOrcLookupKindStatic,
- LLVMOrcLookupKindDLSym
-} LLVMOrcLookupKind;
-
-/**
- * JITDylib lookup flags. This can be used by definition generators when
- * deciding whether to produce a definition for a requested symbol.
- *
- * This enum should be kept in sync with llvm::orc::JITDylibLookupFlags.
- */
-typedef enum {
- LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnly,
- LLVMOrcJITDylibLookupFlagsMatchAllSymbols
-} LLVMOrcJITDylibLookupFlags;
-
-/**
- * Symbol lookup flags for lookup sets. This should be kept in sync with
- * llvm::orc::SymbolLookupFlags.
- */
-typedef enum {
- LLVMOrcSymbolLookupFlagsRequiredSymbol,
- LLVMOrcSymbolLookupFlagsWeaklyReferencedSymbol
-} LLVMOrcSymbolLookupFlags;
-
-/**
- * An element type for a symbol lookup set.
- */
-typedef struct {
- LLVMOrcSymbolStringPoolEntryRef Name;
- LLVMOrcSymbolLookupFlags LookupFlags;
-} LLVMOrcCLookupSetElement;
-
-/**
- * A set of symbols to look up / generate.
- *
- * The list is terminated with an element containing a null pointer for the
- * Name field.
- *
- * If a client creates an instance of this type then they are responsible for
- * freeing it, and for ensuring that all strings have been retained over the
- * course of its life. Clients receiving a copy from a callback are not
- * responsible for managing lifetime or retain counts.
- */
-typedef LLVMOrcCLookupSetElement *LLVMOrcCLookupSet;
-
-/**
- * A reference to an orc::MaterializationUnit.
- */
-typedef struct LLVMOrcOpaqueMaterializationUnit *LLVMOrcMaterializationUnitRef;
-
-/**
+ * Represents a pair of a symbol name and an evaluated symbol.
+ */
+typedef struct {
+ LLVMOrcSymbolStringPoolEntryRef Name;
+ LLVMJITEvaluatedSymbol Sym;
+} LLVMJITCSymbolMapPair;
+
+/**
+ * Represents a list of (SymbolStringPtr, JITEvaluatedSymbol) pairs that can be
+ * used to construct a SymbolMap.
+ */
+typedef LLVMJITCSymbolMapPair *LLVMOrcCSymbolMapPairs;
+
+/**
+ * Lookup kind. This can be used by definition generators when deciding whether
+ * to produce a definition for a requested symbol.
+ *
+ * This enum should be kept in sync with llvm::orc::LookupKind.
+ */
+typedef enum {
+ LLVMOrcLookupKindStatic,
+ LLVMOrcLookupKindDLSym
+} LLVMOrcLookupKind;
+
+/**
+ * JITDylib lookup flags. This can be used by definition generators when
+ * deciding whether to produce a definition for a requested symbol.
+ *
+ * This enum should be kept in sync with llvm::orc::JITDylibLookupFlags.
+ */
+typedef enum {
+ LLVMOrcJITDylibLookupFlagsMatchExportedSymbolsOnly,
+ LLVMOrcJITDylibLookupFlagsMatchAllSymbols
+} LLVMOrcJITDylibLookupFlags;
+
+/**
+ * Symbol lookup flags for lookup sets. This should be kept in sync with
+ * llvm::orc::SymbolLookupFlags.
+ */
+typedef enum {
+ LLVMOrcSymbolLookupFlagsRequiredSymbol,
+ LLVMOrcSymbolLookupFlagsWeaklyReferencedSymbol
+} LLVMOrcSymbolLookupFlags;
+
+/**
+ * An element type for a symbol lookup set.
+ */
+typedef struct {
+ LLVMOrcSymbolStringPoolEntryRef Name;
+ LLVMOrcSymbolLookupFlags LookupFlags;
+} LLVMOrcCLookupSetElement;
+
+/**
+ * A set of symbols to look up / generate.
+ *
+ * The list is terminated with an element containing a null pointer for the
+ * Name field.
+ *
+ * If a client creates an instance of this type then they are responsible for
+ * freeing it, and for ensuring that all strings have been retained over the
+ * course of its life. Clients receiving a copy from a callback are not
+ * responsible for managing lifetime or retain counts.
+ */
+typedef LLVMOrcCLookupSetElement *LLVMOrcCLookupSet;
+
+/**
+ * A reference to an orc::MaterializationUnit.
+ */
+typedef struct LLVMOrcOpaqueMaterializationUnit *LLVMOrcMaterializationUnitRef;
+
+/**
* A reference to an orc::JITDylib instance.
*/
typedef struct LLVMOrcOpaqueJITDylib *LLVMOrcJITDylibRef;
/**
- * A reference to an orc::ResourceTracker instance.
- */
-typedef struct LLVMOrcOpaqueResourceTracker *LLVMOrcResourceTrackerRef;
-
-/**
- * A reference to an orc::DefinitionGenerator.
- */
-typedef struct LLVMOrcOpaqueDefinitionGenerator
- *LLVMOrcDefinitionGeneratorRef;
-
-/**
- * An opaque lookup state object. Instances of this type can be captured to
- * suspend a lookup while a custom generator function attempts to produce a
- * definition.
- *
- * If a client captures a lookup state object then they must eventually call
- * LLVMOrcLookupStateContinueLookup to restart the lookup. This is required
- * in order to release memory allocated for the lookup state, even if errors
- * have occurred while the lookup was suspended (if these errors have made the
- * lookup impossible to complete then it will issue its own error before
- * destruction).
- */
-typedef struct LLVMOrcOpaqueLookupState *LLVMOrcLookupStateRef;
-
-/**
- * A custom generator function. This can be used to create a custom generator
- * object using LLVMOrcCreateCustomCAPIDefinitionGenerator. The resulting
- * object can be attached to a JITDylib, via LLVMOrcJITDylibAddGenerator, to
- * receive callbacks when lookups fail to match existing definitions.
- *
- * GeneratorObj will contain the address of the custom generator object.
- *
- * Ctx will contain the context object passed to
- * LLVMOrcCreateCustomCAPIDefinitionGenerator.
- *
- * LookupState will contain a pointer to an LLVMOrcLookupStateRef object. This
- * can optionally be modified to make the definition generation process
- * asynchronous: If the LookupStateRef value is copied, and the original
- * LLVMOrcLookupStateRef set to null, the lookup will be suspended. Once the
- * asynchronous definition process has been completed clients must call
- * LLVMOrcLookupStateContinueLookup to continue the lookup (this should be
- * done unconditionally, even if errors have occurred in the mean time, to
- * free the lookup state memory and notify the query object of the failures. If
- * LookupState is captured this function must return LLVMErrorSuccess.
- *
- * The Kind argument can be inspected to determine the lookup kind (e.g.
- * as-if-during-static-link, or as-if-during-dlsym).
- *
- * The JD argument specifies which JITDylib the definitions should be generated
- * into.
- *
- * The JDLookupFlags argument can be inspected to determine whether the original
- * lookup included non-exported symobls.
- *
- * Finally, the LookupSet argument contains the set of symbols that could not
- * be found in JD already (the set of generation candidates).
- */
-typedef LLVMErrorRef (*LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction)(
- LLVMOrcDefinitionGeneratorRef GeneratorObj, void *Ctx,
- LLVMOrcLookupStateRef *LookupState, LLVMOrcLookupKind Kind,
- LLVMOrcJITDylibRef JD, LLVMOrcJITDylibLookupFlags JDLookupFlags,
- LLVMOrcCLookupSet LookupSet, size_t LookupSetSize);
-
-/**
+ * A reference to an orc::ResourceTracker instance.
+ */
+typedef struct LLVMOrcOpaqueResourceTracker *LLVMOrcResourceTrackerRef;
+
+/**
+ * A reference to an orc::DefinitionGenerator.
+ */
+typedef struct LLVMOrcOpaqueDefinitionGenerator
+ *LLVMOrcDefinitionGeneratorRef;
+
+/**
+ * An opaque lookup state object. Instances of this type can be captured to
+ * suspend a lookup while a custom generator function attempts to produce a
+ * definition.
+ *
+ * If a client captures a lookup state object then they must eventually call
+ * LLVMOrcLookupStateContinueLookup to restart the lookup. This is required
+ * in order to release memory allocated for the lookup state, even if errors
+ * have occurred while the lookup was suspended (if these errors have made the
+ * lookup impossible to complete then it will issue its own error before
+ * destruction).
+ */
+typedef struct LLVMOrcOpaqueLookupState *LLVMOrcLookupStateRef;
+
+/**
+ * A custom generator function. This can be used to create a custom generator
+ * object using LLVMOrcCreateCustomCAPIDefinitionGenerator. The resulting
+ * object can be attached to a JITDylib, via LLVMOrcJITDylibAddGenerator, to
+ * receive callbacks when lookups fail to match existing definitions.
+ *
+ * GeneratorObj will contain the address of the custom generator object.
+ *
+ * Ctx will contain the context object passed to
+ * LLVMOrcCreateCustomCAPIDefinitionGenerator.
+ *
+ * LookupState will contain a pointer to an LLVMOrcLookupStateRef object. This
+ * can optionally be modified to make the definition generation process
+ * asynchronous: If the LookupStateRef value is copied, and the original
+ * LLVMOrcLookupStateRef set to null, the lookup will be suspended. Once the
+ * asynchronous definition process has been completed clients must call
+ * LLVMOrcLookupStateContinueLookup to continue the lookup (this should be
+ * done unconditionally, even if errors have occurred in the mean time, to
+ * free the lookup state memory and notify the query object of the failures. If
+ * LookupState is captured this function must return LLVMErrorSuccess.
+ *
+ * The Kind argument can be inspected to determine the lookup kind (e.g.
+ * as-if-during-static-link, or as-if-during-dlsym).
+ *
+ * The JD argument specifies which JITDylib the definitions should be generated
+ * into.
+ *
+ * The JDLookupFlags argument can be inspected to determine whether the original
+ * lookup included non-exported symobls.
+ *
+ * Finally, the LookupSet argument contains the set of symbols that could not
+ * be found in JD already (the set of generation candidates).
+ */
+typedef LLVMErrorRef (*LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction)(
+ LLVMOrcDefinitionGeneratorRef GeneratorObj, void *Ctx,
+ LLVMOrcLookupStateRef *LookupState, LLVMOrcLookupKind Kind,
+ LLVMOrcJITDylibRef JD, LLVMOrcJITDylibLookupFlags JDLookupFlags,
+ LLVMOrcCLookupSet LookupSet, size_t LookupSetSize);
+
+/**
* Predicate function for SymbolStringPoolEntries.
*/
-typedef int (*LLVMOrcSymbolPredicate)(void *Ctx,
- LLVMOrcSymbolStringPoolEntryRef Sym);
+typedef int (*LLVMOrcSymbolPredicate)(void *Ctx,
+ LLVMOrcSymbolStringPoolEntryRef Sym);
/**
* A reference to an orc::ThreadSafeContext instance.
@@ -258,45 +258,45 @@ typedef struct LLVMOrcOpaqueJITTargetMachineBuilder
*LLVMOrcJITTargetMachineBuilderRef;
/**
- * A reference to an orc::ObjectLayer instance.
- */
-typedef struct LLVMOrcOpaqueObjectLayer *LLVMOrcObjectLayerRef;
-
-/**
- * Attach a custom error reporter function to the ExecutionSession.
- *
- * The error reporter will be called to deliver failure notices that can not be
- * directly reported to a caller. For example, failure to resolve symbols in
- * the JIT linker is typically reported via the error reporter (callers
- * requesting definitions from the JIT will typically be delivered a
- * FailureToMaterialize error instead).
- */
-void LLVMOrcExecutionSessionSetErrorReporter(
- LLVMOrcExecutionSessionRef ES, LLVMOrcErrorReporterFunction ReportError,
- void *Ctx);
-
-/**
- * Return a reference to the SymbolStringPool for an ExecutionSession.
- *
- * Ownership of the pool remains with the ExecutionSession: The caller is
- * not required to free the pool.
- */
-LLVMOrcSymbolStringPoolRef
-LLVMOrcExecutionSessionGetSymbolStringPool(LLVMOrcExecutionSessionRef ES);
-
-/**
- * Clear all unreferenced symbol string pool entries.
- *
- * This can be called at any time to release unused entries in the
- * ExecutionSession's string pool. Since it locks the pool (preventing
- * interning of any new strings) it is recommended that it only be called
- * infrequently, ideally when the caller has reason to believe that some
- * entries will have become unreferenced, e.g. after removing a module or
- * closing a JITDylib.
- */
-void LLVMOrcSymbolStringPoolClearDeadEntries(LLVMOrcSymbolStringPoolRef SSP);
-
-/**
+ * A reference to an orc::ObjectLayer instance.
+ */
+typedef struct LLVMOrcOpaqueObjectLayer *LLVMOrcObjectLayerRef;
+
+/**
+ * Attach a custom error reporter function to the ExecutionSession.
+ *
+ * The error reporter will be called to deliver failure notices that can not be
+ * directly reported to a caller. For example, failure to resolve symbols in
+ * the JIT linker is typically reported via the error reporter (callers
+ * requesting definitions from the JIT will typically be delivered a
+ * FailureToMaterialize error instead).
+ */
+void LLVMOrcExecutionSessionSetErrorReporter(
+ LLVMOrcExecutionSessionRef ES, LLVMOrcErrorReporterFunction ReportError,
+ void *Ctx);
+
+/**
+ * Return a reference to the SymbolStringPool for an ExecutionSession.
+ *
+ * Ownership of the pool remains with the ExecutionSession: The caller is
+ * not required to free the pool.
+ */
+LLVMOrcSymbolStringPoolRef
+LLVMOrcExecutionSessionGetSymbolStringPool(LLVMOrcExecutionSessionRef ES);
+
+/**
+ * Clear all unreferenced symbol string pool entries.
+ *
+ * This can be called at any time to release unused entries in the
+ * ExecutionSession's string pool. Since it locks the pool (preventing
+ * interning of any new strings) it is recommended that it only be called
+ * infrequently, ideally when the caller has reason to believe that some
+ * entries will have become unreferenced, e.g. after removing a module or
+ * closing a JITDylib.
+ */
+void LLVMOrcSymbolStringPoolClearDeadEntries(LLVMOrcSymbolStringPoolRef SSP);
+
+/**
* Intern a string in the ExecutionSession's SymbolStringPool and return a
* reference to it. This increments the ref-count of the pool entry, and the
* returned value should be released once the client is done with it by
@@ -312,140 +312,140 @@ LLVMOrcSymbolStringPoolEntryRef
LLVMOrcExecutionSessionIntern(LLVMOrcExecutionSessionRef ES, const char *Name);
/**
- * Increments the ref-count for a SymbolStringPool entry.
- */
-void LLVMOrcRetainSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S);
-
-/**
+ * Increments the ref-count for a SymbolStringPool entry.
+ */
+void LLVMOrcRetainSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S);
+
+/**
* Reduces the ref-count for of a SymbolStringPool entry.
*/
void LLVMOrcReleaseSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S);
-const char *LLVMOrcSymbolStringPoolEntryStr(LLVMOrcSymbolStringPoolEntryRef S);
-
-/**
- * Reduces the ref-count of a ResourceTracker.
- */
-void LLVMOrcReleaseResourceTracker(LLVMOrcResourceTrackerRef RT);
-
-/**
- * Transfers tracking of all resources associated with resource tracker SrcRT
- * to resource tracker DstRT.
- */
-void LLVMOrcResourceTrackerTransferTo(LLVMOrcResourceTrackerRef SrcRT,
- LLVMOrcResourceTrackerRef DstRT);
-
-/**
- * Remove all resources associated with the given tracker. See
- * ResourceTracker::remove().
- */
-LLVMErrorRef LLVMOrcResourceTrackerRemove(LLVMOrcResourceTrackerRef RT);
-
-/**
+const char *LLVMOrcSymbolStringPoolEntryStr(LLVMOrcSymbolStringPoolEntryRef S);
+
+/**
+ * Reduces the ref-count of a ResourceTracker.
+ */
+void LLVMOrcReleaseResourceTracker(LLVMOrcResourceTrackerRef RT);
+
+/**
+ * Transfers tracking of all resources associated with resource tracker SrcRT
+ * to resource tracker DstRT.
+ */
+void LLVMOrcResourceTrackerTransferTo(LLVMOrcResourceTrackerRef SrcRT,
+ LLVMOrcResourceTrackerRef DstRT);
+
+/**
+ * Remove all resources associated with the given tracker. See
+ * ResourceTracker::remove().
+ */
+LLVMErrorRef LLVMOrcResourceTrackerRemove(LLVMOrcResourceTrackerRef RT);
+
+/**
* Dispose of a JITDylib::DefinitionGenerator. This should only be called if
* ownership has not been passed to a JITDylib (e.g. because some error
* prevented the client from calling LLVMOrcJITDylibAddGenerator).
*/
-void LLVMOrcDisposeDefinitionGenerator(LLVMOrcDefinitionGeneratorRef DG);
-
-/**
- * Dispose of a MaterializationUnit.
- */
-void LLVMOrcDisposeMaterializationUnit(LLVMOrcMaterializationUnitRef MU);
-
-/**
- * Create a MaterializationUnit to define the given symbols as pointing to
- * the corresponding raw addresses.
- */
-LLVMOrcMaterializationUnitRef
-LLVMOrcAbsoluteSymbols(LLVMOrcCSymbolMapPairs Syms, size_t NumPairs);
-
-/**
- * Create a "bare" JITDylib.
+void LLVMOrcDisposeDefinitionGenerator(LLVMOrcDefinitionGeneratorRef DG);
+
+/**
+ * Dispose of a MaterializationUnit.
+ */
+void LLVMOrcDisposeMaterializationUnit(LLVMOrcMaterializationUnitRef MU);
+
+/**
+ * Create a MaterializationUnit to define the given symbols as pointing to
+ * the corresponding raw addresses.
+ */
+LLVMOrcMaterializationUnitRef
+LLVMOrcAbsoluteSymbols(LLVMOrcCSymbolMapPairs Syms, size_t NumPairs);
+
+/**
+ * Create a "bare" JITDylib.
+ *
+ * The client is responsible for ensuring that the JITDylib's name is unique,
+ * e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.
+ *
+ * This call does not install any library code or symbols into the newly
+ * created JITDylib. The client is responsible for all configuration.
+ */
+LLVMOrcJITDylibRef
+LLVMOrcExecutionSessionCreateBareJITDylib(LLVMOrcExecutionSessionRef ES,
+ const char *Name);
+
+/**
+ * Create a JITDylib.
+ *
+ * The client is responsible for ensuring that the JITDylib's name is unique,
+ * e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.
+ *
+ * If a Platform is attached to the ExecutionSession then
+ * Platform::setupJITDylib will be called to install standard platform symbols
+ * (e.g. standard library interposes). If no Platform is installed then this
+ * call is equivalent to LLVMExecutionSessionRefCreateBareJITDylib and will
+ * always return success.
+ */
+LLVMErrorRef
+LLVMOrcExecutionSessionCreateJITDylib(LLVMOrcExecutionSessionRef ES,
+ LLVMOrcJITDylibRef *Result,
+ const char *Name);
+
+/**
+ * Returns the JITDylib with the given name, or NULL if no such JITDylib
+ * exists.
+ */
+LLVMOrcJITDylibRef
+LLVMOrcExecutionSessionGetJITDylibByName(LLVMOrcExecutionSessionRef ES,
+ const char *Name);
+
+/**
+ * Return a reference to a newly created resource tracker associated with JD.
+ * The tracker is returned with an initial ref-count of 1, and must be released
+ * with LLVMOrcReleaseResourceTracker when no longer needed.
+ */
+LLVMOrcResourceTrackerRef
+LLVMOrcJITDylibCreateResourceTracker(LLVMOrcJITDylibRef JD);
+
+/**
+ * Return a reference to the default resource tracker for the given JITDylib.
+ * This operation will increase the retain count of the tracker: Clients should
+ * call LLVMOrcReleaseResourceTracker when the result is no longer needed.
+ */
+LLVMOrcResourceTrackerRef
+LLVMOrcJITDylibGetDefaultResourceTracker(LLVMOrcJITDylibRef JD);
+
+/**
+ * Add the given MaterializationUnit to the given JITDylib.
+ *
+ * If this operation succeeds then JITDylib JD will take ownership of MU.
+ * If the operation fails then ownership remains with the caller who should
+ * call LLVMOrcDisposeMaterializationUnit to destroy it.
+ */
+LLVMErrorRef LLVMOrcJITDylibDefine(LLVMOrcJITDylibRef JD,
+ LLVMOrcMaterializationUnitRef MU);
+
+/**
+ * Calls remove on all trackers associated with this JITDylib, see
+ * JITDylib::clear().
+ */
+LLVMErrorRef LLVMOrcJITDylibClear(LLVMOrcJITDylibRef JD);
+
+/**
+ * Add a DefinitionGenerator to the given JITDylib.
*
- * The client is responsible for ensuring that the JITDylib's name is unique,
- * e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.
- *
- * This call does not install any library code or symbols into the newly
- * created JITDylib. The client is responsible for all configuration.
- */
-LLVMOrcJITDylibRef
-LLVMOrcExecutionSessionCreateBareJITDylib(LLVMOrcExecutionSessionRef ES,
- const char *Name);
-
-/**
- * Create a JITDylib.
- *
- * The client is responsible for ensuring that the JITDylib's name is unique,
- * e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.
- *
- * If a Platform is attached to the ExecutionSession then
- * Platform::setupJITDylib will be called to install standard platform symbols
- * (e.g. standard library interposes). If no Platform is installed then this
- * call is equivalent to LLVMExecutionSessionRefCreateBareJITDylib and will
- * always return success.
- */
-LLVMErrorRef
-LLVMOrcExecutionSessionCreateJITDylib(LLVMOrcExecutionSessionRef ES,
- LLVMOrcJITDylibRef *Result,
- const char *Name);
-
-/**
- * Returns the JITDylib with the given name, or NULL if no such JITDylib
- * exists.
- */
-LLVMOrcJITDylibRef
-LLVMOrcExecutionSessionGetJITDylibByName(LLVMOrcExecutionSessionRef ES,
- const char *Name);
-
-/**
- * Return a reference to a newly created resource tracker associated with JD.
- * The tracker is returned with an initial ref-count of 1, and must be released
- * with LLVMOrcReleaseResourceTracker when no longer needed.
- */
-LLVMOrcResourceTrackerRef
-LLVMOrcJITDylibCreateResourceTracker(LLVMOrcJITDylibRef JD);
-
-/**
- * Return a reference to the default resource tracker for the given JITDylib.
- * This operation will increase the retain count of the tracker: Clients should
- * call LLVMOrcReleaseResourceTracker when the result is no longer needed.
- */
-LLVMOrcResourceTrackerRef
-LLVMOrcJITDylibGetDefaultResourceTracker(LLVMOrcJITDylibRef JD);
-
-/**
- * Add the given MaterializationUnit to the given JITDylib.
- *
- * If this operation succeeds then JITDylib JD will take ownership of MU.
- * If the operation fails then ownership remains with the caller who should
- * call LLVMOrcDisposeMaterializationUnit to destroy it.
- */
-LLVMErrorRef LLVMOrcJITDylibDefine(LLVMOrcJITDylibRef JD,
- LLVMOrcMaterializationUnitRef MU);
-
-/**
- * Calls remove on all trackers associated with this JITDylib, see
- * JITDylib::clear().
- */
-LLVMErrorRef LLVMOrcJITDylibClear(LLVMOrcJITDylibRef JD);
-
-/**
- * Add a DefinitionGenerator to the given JITDylib.
- *
* The JITDylib will take ownership of the given generator: The client is no
* longer responsible for managing its memory.
*/
void LLVMOrcJITDylibAddGenerator(LLVMOrcJITDylibRef JD,
- LLVMOrcDefinitionGeneratorRef DG);
+ LLVMOrcDefinitionGeneratorRef DG);
+
+/**
+ * Create a custom generator.
+ */
+LLVMOrcDefinitionGeneratorRef LLVMOrcCreateCustomCAPIDefinitionGenerator(
+ LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction F, void *Ctx);
/**
- * Create a custom generator.
- */
-LLVMOrcDefinitionGeneratorRef LLVMOrcCreateCustomCAPIDefinitionGenerator(
- LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction F, void *Ctx);
-
-/**
* Get a DynamicLibrarySearchGenerator that will reflect process symbols into
* the JITDylib. On success the resulting generator is owned by the client.
* Ownership is typically transferred by adding the instance to a JITDylib
@@ -464,7 +464,7 @@ LLVMOrcDefinitionGeneratorRef LLVMOrcCreateCustomCAPIDefinitionGenerator(
* the global prefix if present.
*/
LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(
- LLVMOrcDefinitionGeneratorRef *Result, char GlobalPrefx,
+ LLVMOrcDefinitionGeneratorRef *Result, char GlobalPrefx,
LLVMOrcSymbolPredicate Filter, void *FilterCtx);
/**
@@ -472,7 +472,7 @@ LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(
*
* Ownership of the underlying ThreadSafeContext data is shared: Clients
* can and should dispose of their ThreadSafeContext as soon as they no longer
- * need to refer to it directly. Other references (e.g. from ThreadSafeModules)
+ * need to refer to it directly. Other references (e.g. from ThreadSafeModules)
* will keep the data alive as long as it is needed.
*/
LLVMOrcThreadSafeContextRef LLVMOrcCreateNewThreadSafeContext(void);
@@ -494,7 +494,7 @@ void LLVMOrcDisposeThreadSafeContext(LLVMOrcThreadSafeContextRef TSCtx);
* after this function returns.
*
* Ownership of the ThreadSafeModule is unique: If it is transferred to the JIT
- * (e.g. by LLVMOrcLLJITAddLLVMIRModule) then the client is no longer
+ * (e.g. by LLVMOrcLLJITAddLLVMIRModule) then the client is no longer
* responsible for it. If it is not transferred to the JIT then the client
* should call LLVMOrcDisposeThreadSafeModule to dispose of it.
*/
@@ -537,9 +537,9 @@ void LLVMOrcDisposeJITTargetMachineBuilder(
LLVMOrcJITTargetMachineBuilderRef JTMB);
/**
- * Dispose of an ObjectLayer.
+ * Dispose of an ObjectLayer.
*/
-void LLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer);
+void LLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer);
LLVM_C_EXTERN_C_END
diff --git a/contrib/libs/llvm12/include/llvm-c/OrcEE.h b/contrib/libs/llvm12/include/llvm-c/OrcEE.h
index b85197025d..a79007914e 100644
--- a/contrib/libs/llvm12/include/llvm-c/OrcEE.h
+++ b/contrib/libs/llvm12/include/llvm-c/OrcEE.h
@@ -1,66 +1,66 @@
-#pragma once
-
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#endif
-
-/*===-- llvm-c/OrcEE.h - OrcV2 C bindings ExecutionEngine utils -*- C++ -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This header declares the C interface to ExecutionEngine based utils, e.g. *|
-|* RTDyldObjectLinkingLayer (based on RuntimeDyld) in Orc. *|
-|* *|
-|* Many exotic languages can interoperate with C code but have a harder time *|
-|* with C++ due to name mangling. So in addition to C, this interface enables *|
-|* tools written in such languages. *|
-|* *|
-|* Note: This interface is experimental. It is *NOT* stable, and may be *|
-|* changed without warning. Only C API usage documentation is *|
-|* provided. See the C++ documentation for all higher level ORC API *|
-|* details. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_C_ORCEE_H
-#define LLVM_C_ORCEE_H
-
-#include "llvm-c/Error.h"
-#include "llvm-c/ExecutionEngine.h"
-#include "llvm-c/Orc.h"
-#include "llvm-c/TargetMachine.h"
-#include "llvm-c/Types.h"
-
-LLVM_C_EXTERN_C_BEGIN
-
-/**
- * Create a RTDyldObjectLinkingLayer instance using the standard
- * SectionMemoryManager for memory management.
- */
-LLVMOrcObjectLayerRef
-LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(
- LLVMOrcExecutionSessionRef ES);
-
-/**
- * Add the given listener to the given RTDyldObjectLinkingLayer.
- *
- * Note: Layer must be an RTDyldObjectLinkingLayer instance or
- * behavior is undefined.
- */
-void LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(
- LLVMOrcObjectLayerRef RTDyldObjLinkingLayer,
- LLVMJITEventListenerRef Listener);
-
-LLVM_C_EXTERN_C_END
-
-#endif /* LLVM_C_ORCEE_H */
-
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+#pragma once
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
+/*===-- llvm-c/OrcEE.h - OrcV2 C bindings ExecutionEngine utils -*- C++ -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This header declares the C interface to ExecutionEngine based utils, e.g. *|
+|* RTDyldObjectLinkingLayer (based on RuntimeDyld) in Orc. *|
+|* *|
+|* Many exotic languages can interoperate with C code but have a harder time *|
+|* with C++ due to name mangling. So in addition to C, this interface enables *|
+|* tools written in such languages. *|
+|* *|
+|* Note: This interface is experimental. It is *NOT* stable, and may be *|
+|* changed without warning. Only C API usage documentation is *|
+|* provided. See the C++ documentation for all higher level ORC API *|
+|* details. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_C_ORCEE_H
+#define LLVM_C_ORCEE_H
+
+#include "llvm-c/Error.h"
+#include "llvm-c/ExecutionEngine.h"
+#include "llvm-c/Orc.h"
+#include "llvm-c/TargetMachine.h"
+#include "llvm-c/Types.h"
+
+LLVM_C_EXTERN_C_BEGIN
+
+/**
+ * Create a RTDyldObjectLinkingLayer instance using the standard
+ * SectionMemoryManager for memory management.
+ */
+LLVMOrcObjectLayerRef
+LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(
+ LLVMOrcExecutionSessionRef ES);
+
+/**
+ * Add the given listener to the given RTDyldObjectLinkingLayer.
+ *
+ * Note: Layer must be an RTDyldObjectLinkingLayer instance or
+ * behavior is undefined.
+ */
+void LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(
+ LLVMOrcObjectLayerRef RTDyldObjLinkingLayer,
+ LLVMJITEventListenerRef Listener);
+
+LLVM_C_EXTERN_C_END
+
+#endif /* LLVM_C_ORCEE_H */
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
diff --git a/contrib/libs/llvm12/include/llvm-c/Transforms/Scalar.h b/contrib/libs/llvm12/include/llvm-c/Transforms/Scalar.h
index 1948959a0b..15a0885c2f 100644
--- a/contrib/libs/llvm12/include/llvm-c/Transforms/Scalar.h
+++ b/contrib/libs/llvm12/include/llvm-c/Transforms/Scalar.h
@@ -74,9 +74,9 @@ void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM);
/** See llvm::createInstructionCombiningPass function. */
void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
-/** See llvm::createInstSimplifyLegacyPass function. */
-void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM);
-
+/** See llvm::createInstSimplifyLegacyPass function. */
+void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM);
+
/** See llvm::createJumpThreadingPass function. */
void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM);