Browse Source

Update Windows to LLVM 12.0.1

gingerBill 4 years ago
parent
commit
c51c002ffa

BIN
LLVM-C.dll


BIN
bin/llvm/windows/LLVM-C.lib


+ 2 - 1
build.bat

@@ -49,7 +49,8 @@ set compiler_warnings= ^
 	-wd4100 -wd4101 -wd4127 -wd4146 ^
 	-wd4100 -wd4101 -wd4127 -wd4146 ^
 	-wd4456 -wd4457
 	-wd4456 -wd4457
 
 
-set compiler_includes=
+set compiler_includes= ^
+	/Isrc\
 set libs= ^
 set libs= ^
 	kernel32.lib ^
 	kernel32.lib ^
 	bin\llvm\windows\LLVM-C.lib
 	bin\llvm\windows\LLVM-C.lib

+ 2 - 2
src/llvm-c/Analysis.h

@@ -19,8 +19,8 @@
 #ifndef LLVM_C_ANALYSIS_H
 #ifndef LLVM_C_ANALYSIS_H
 #define LLVM_C_ANALYSIS_H
 #define LLVM_C_ANALYSIS_H
 
 
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/BitReader.h

@@ -19,8 +19,8 @@
 #ifndef LLVM_C_BITREADER_H
 #ifndef LLVM_C_BITREADER_H
 #define LLVM_C_BITREADER_H
 #define LLVM_C_BITREADER_H
 
 
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/BitWriter.h

@@ -19,8 +19,8 @@
 #ifndef LLVM_C_BITWRITER_H
 #ifndef LLVM_C_BITWRITER_H
 #define LLVM_C_BITWRITER_H
 #define LLVM_C_BITWRITER_H
 
 
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Comdat.h

@@ -14,8 +14,8 @@
 #ifndef LLVM_C_COMDAT_H
 #ifndef LLVM_C_COMDAT_H
 #define LLVM_C_COMDAT_H
 #define LLVM_C_COMDAT_H
 
 
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Config/llvm-config.h

@@ -66,7 +66,7 @@
 #define LLVM_USE_PERF 0
 #define LLVM_USE_PERF 0
 
 
 /* Major version of the LLVM API */
 /* Major version of the LLVM API */
-#define LLVM_VERSION_MAJOR 11
+#define LLVM_VERSION_MAJOR 12
 
 
 /* Minor version of the LLVM API */
 /* Minor version of the LLVM API */
 #define LLVM_VERSION_MINOR 0
 #define LLVM_VERSION_MINOR 0
@@ -75,7 +75,7 @@
 #define LLVM_VERSION_PATCH 1
 #define LLVM_VERSION_PATCH 1
 
 
 /* LLVM version string */
 /* LLVM version string */
-#define LLVM_VERSION_STRING "11.0.1"
+#define LLVM_VERSION_STRING "12.0.1"
 
 
 /* Whether LLVM records statistics for use with GetStatistics(),
 /* Whether LLVM records statistics for use with GetStatistics(),
  * PrintStatistics() or PrintStatisticsJSON()
  * PrintStatistics() or PrintStatisticsJSON()

+ 57 - 9
src/llvm-c/Core.h

@@ -15,9 +15,9 @@
 #ifndef LLVM_C_CORE_H
 #ifndef LLVM_C_CORE_H
 #define LLVM_C_CORE_H
 #define LLVM_C_CORE_H
 
 
-#include "ErrorHandling.h"
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ErrorHandling.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 
@@ -162,7 +162,8 @@ typedef enum {
   LLVMX86_MMXTypeKind,   /**< X86 MMX */
   LLVMX86_MMXTypeKind,   /**< X86 MMX */
   LLVMTokenTypeKind,     /**< Tokens */
   LLVMTokenTypeKind,     /**< Tokens */
   LLVMScalableVectorTypeKind, /**< Scalable SIMD vector type */
   LLVMScalableVectorTypeKind, /**< Scalable SIMD vector type */
-  LLVMBFloatTypeKind     /**< 16 bit brain floating point type */
+  LLVMBFloatTypeKind,    /**< 16 bit brain floating point type */
+  LLVMX86_AMXTypeKind    /**< X86 AMX */
 } LLVMTypeKind;
 } LLVMTypeKind;
 
 
 typedef enum {
 typedef enum {
@@ -281,6 +282,7 @@ typedef enum {
   LLVMInlineAsmValueKind,
   LLVMInlineAsmValueKind,
 
 
   LLVMInstructionValueKind,
   LLVMInstructionValueKind,
+  LLVMPoisonValueValueKind
 } LLVMValueKind;
 } LLVMValueKind;
 
 
 typedef enum {
 typedef enum {
@@ -602,6 +604,17 @@ unsigned LLVMGetEnumAttributeKind(LLVMAttributeRef A);
  */
  */
 uint64_t LLVMGetEnumAttributeValue(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 string attribute.
  * Create a string attribute.
  */
  */
@@ -624,6 +637,12 @@ const char *LLVMGetStringAttributeValue(LLVMAttributeRef A, unsigned *Length);
  */
  */
 LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A);
 LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A);
 LLVMBool LLVMIsStringAttribute(LLVMAttributeRef A);
 LLVMBool LLVMIsStringAttribute(LLVMAttributeRef A);
+LLVMBool LLVMIsTypeAttribute(LLVMAttributeRef A);
+
+/**
+ * Obtain a Type from a context by its registered name.
+ */
+LLVMTypeRef LLVMGetTypeByName2(LLVMContextRef C, const char *Name);
 
 
 /**
 /**
  * @}
  * @}
@@ -866,9 +885,7 @@ LLVMValueRef LLVMGetInlineAsm(LLVMTypeRef Ty,
  */
  */
 LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M);
 LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M);
 
 
-/**
- * Obtain a Type from a module by its registered name.
- */
+/** Deprecated: Use LLVMGetTypeByName2 instead. */
 LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name);
 LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name);
 
 
 /**
 /**
@@ -1444,9 +1461,21 @@ unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy);
 LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount);
 LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount);
 
 
 /**
 /**
- * Obtain the number of elements in a vector type.
+ * Create a vector type that contains a defined type and has a scalable
+ * number of elements.
  *
  *
- * This only works on types that represent vectors.
+ * 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::VectorType::getNumElements()
  * @see llvm::VectorType::getNumElements()
  */
  */
@@ -1477,6 +1506,11 @@ LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C);
  */
  */
 LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C);
 LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C);
 
 
+/**
+ * Create a X86 AMX type in a context.
+ */
+LLVMTypeRef LLVMX86AMXTypeInContext(LLVMContextRef C);
+
 /**
 /**
  * Create a token type in a context.
  * Create a token type in a context.
  */
  */
@@ -1494,6 +1528,7 @@ LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C);
 LLVMTypeRef LLVMVoidType(void);
 LLVMTypeRef LLVMVoidType(void);
 LLVMTypeRef LLVMLabelType(void);
 LLVMTypeRef LLVMLabelType(void);
 LLVMTypeRef LLVMX86MMXType(void);
 LLVMTypeRef LLVMX86MMXType(void);
+LLVMTypeRef LLVMX86AMXType(void);
 
 
 /**
 /**
  * @}
  * @}
@@ -1550,6 +1585,7 @@ LLVMTypeRef LLVMX86MMXType(void);
           macro(Function)                   \
           macro(Function)                   \
           macro(GlobalVariable)             \
           macro(GlobalVariable)             \
       macro(UndefValue)                     \
       macro(UndefValue)                     \
+      macro(PoisonValue)                    \
     macro(Instruction)                      \
     macro(Instruction)                      \
       macro(UnaryOperator)                  \
       macro(UnaryOperator)                  \
       macro(BinaryOperator)                 \
       macro(BinaryOperator)                 \
@@ -1683,6 +1719,11 @@ LLVMBool LLVMIsConstant(LLVMValueRef Val);
  */
  */
 LLVMBool LLVMIsUndef(LLVMValueRef Val);
 LLVMBool LLVMIsUndef(LLVMValueRef Val);
 
 
+/**
+ * Determine whether a value instance is poisonous.
+ */
+LLVMBool LLVMIsPoison(LLVMValueRef Val);
+
 /**
 /**
  * Convert value instances between types.
  * Convert value instances between types.
  *
  *
@@ -1841,6 +1882,13 @@ LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty);
  */
  */
 LLVMValueRef LLVMGetUndef(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);
+
 /**
 /**
  * Determine whether a value instance is null.
  * Determine whether a value instance is null.
  *
  *

+ 0 - 4
src/llvm-c/DataTypes.h

@@ -77,8 +77,4 @@ typedef signed int ssize_t;
 # define UINT64_MAX 0xffffffffffffffffULL
 # define UINT64_MAX 0xffffffffffffffffULL
 #endif
 #endif
 
 
-#ifndef HUGE_VALF
-#define HUGE_VALF (float)HUGE_VAL
-#endif
-
 #endif /* LLVM_C_DATATYPES_H */
 #endif /* LLVM_C_DATATYPES_H */

+ 5 - 3
src/llvm-c/DebugInfo.h

@@ -16,8 +16,8 @@
 #ifndef LLVM_C_DEBUGINFO_H
 #ifndef LLVM_C_DEBUGINFO_H
 #define LLVM_C_DEBUGINFO_H
 #define LLVM_C_DEBUGINFO_H
 
 
-#include "Core.h"
-#include "ExternC.h"
+#include "llvm-c/Core.h"
+#include "llvm-c/ExternC.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 
@@ -159,7 +159,9 @@ enum {
   LLVMDIImportedEntityMetadataKind,
   LLVMDIImportedEntityMetadataKind,
   LLVMDIMacroMetadataKind,
   LLVMDIMacroMetadataKind,
   LLVMDIMacroFileMetadataKind,
   LLVMDIMacroFileMetadataKind,
-  LLVMDICommonBlockMetadataKind
+  LLVMDICommonBlockMetadataKind,
+  LLVMDIStringTypeMetadataKind,
+  LLVMDIGenericSubrangeMetadataKind
 };
 };
 typedef unsigned LLVMMetadataKind;
 typedef unsigned LLVMMetadataKind;
 
 

+ 2 - 2
src/llvm-c/Disassembler.h

@@ -15,8 +15,8 @@
 #ifndef LLVM_C_DISASSEMBLER_H
 #ifndef LLVM_C_DISASSEMBLER_H
 #define LLVM_C_DISASSEMBLER_H
 #define LLVM_C_DISASSEMBLER_H
 
 
-#include "DisassemblerTypes.h"
-#include "ExternC.h"
+#include "llvm-c/DisassemblerTypes.h"
+#include "llvm-c/ExternC.h"
 
 
 /**
 /**
  * @defgroup LLVMCDisassembler Disassembler
  * @defgroup LLVMCDisassembler Disassembler

+ 1 - 1
src/llvm-c/DisassemblerTypes.h

@@ -10,7 +10,7 @@
 #ifndef LLVM_DISASSEMBLER_TYPES_H
 #ifndef LLVM_DISASSEMBLER_TYPES_H
 #define LLVM_DISASSEMBLER_TYPES_H
 #define LLVM_DISASSEMBLER_TYPES_H
 
 
-#include "DataTypes.h"
+#include "llvm-c/DataTypes.h"
 #ifdef __cplusplus
 #ifdef __cplusplus
 #include <cstddef>
 #include <cstddef>
 #else
 #else

+ 6 - 1
src/llvm-c/Error.h

@@ -14,7 +14,7 @@
 #ifndef LLVM_C_ERROR_H
 #ifndef LLVM_C_ERROR_H
 #define LLVM_C_ERROR_H
 #define LLVM_C_ERROR_H
 
 
-#include "ExternC.h"
+#include "llvm-c/ExternC.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 
@@ -62,6 +62,11 @@ void LLVMDisposeErrorMessage(char *ErrMsg);
  */
  */
 LLVMErrorTypeId LLVMGetStringErrorTypeId(void);
 LLVMErrorTypeId LLVMGetStringErrorTypeId(void);
 
 
+/**
+ * Create a StringError.
+ */
+LLVMErrorRef LLVMCreateStringError(const char *ErrMsg);
+
 LLVM_C_EXTERN_C_END
 LLVM_C_EXTERN_C_END
 
 
 #endif
 #endif

+ 1 - 1
src/llvm-c/ErrorHandling.h

@@ -14,7 +14,7 @@
 #ifndef LLVM_C_ERROR_HANDLING_H
 #ifndef LLVM_C_ERROR_HANDLING_H
 #define LLVM_C_ERROR_HANDLING_H
 #define LLVM_C_ERROR_HANDLING_H
 
 
-#include "ExternC.h"
+#include "llvm-c/ExternC.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 4 - 4
src/llvm-c/ExecutionEngine.h

@@ -19,10 +19,10 @@
 #ifndef LLVM_C_EXECUTIONENGINE_H
 #ifndef LLVM_C_EXECUTIONENGINE_H
 #define LLVM_C_EXECUTIONENGINE_H
 #define LLVM_C_EXECUTIONENGINE_H
 
 
-#include "ExternC.h"
-#include "Target.h"
-#include "TargetMachine.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Target.h"
+#include "llvm-c/TargetMachine.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/IRReader.h

@@ -14,8 +14,8 @@
 #ifndef LLVM_C_IRREADER_H
 #ifndef LLVM_C_IRREADER_H
 #define LLVM_C_IRREADER_H
 #define LLVM_C_IRREADER_H
 
 
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Initialization.h

@@ -16,8 +16,8 @@
 #ifndef LLVM_C_INITIALIZATION_H
 #ifndef LLVM_C_INITIALIZATION_H
 #define LLVM_C_INITIALIZATION_H
 #define LLVM_C_INITIALIZATION_H
 
 
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Linker.h

@@ -14,8 +14,8 @@
 #ifndef LLVM_C_LINKER_H
 #ifndef LLVM_C_LINKER_H
 #define LLVM_C_LINKER_H
 #define LLVM_C_LINKER_H
 
 
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 3 - 3
src/llvm-c/Object.h

@@ -19,9 +19,9 @@
 #ifndef LLVM_C_OBJECT_H
 #ifndef LLVM_C_OBJECT_H
 #define LLVM_C_OBJECT_H
 #define LLVM_C_OBJECT_H
 
 
-#include "ExternC.h"
-#include "Types.h"
-#include "Config/llvm-config.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
+#include "llvm-c/Config/llvm-config.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Remarks.h

@@ -15,8 +15,8 @@
 #ifndef LLVM_C_REMARKS_H
 #ifndef LLVM_C_REMARKS_H
 #define LLVM_C_REMARKS_H
 #define LLVM_C_REMARKS_H
 
 
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 #ifdef __cplusplus
 #ifdef __cplusplus
 #include <cstddef>
 #include <cstddef>
 #else
 #else

+ 3 - 3
src/llvm-c/Support.h

@@ -14,9 +14,9 @@
 #ifndef LLVM_C_SUPPORT_H
 #ifndef LLVM_C_SUPPORT_H
 #define LLVM_C_SUPPORT_H
 #define LLVM_C_SUPPORT_H
 
 
-#include "DataTypes.h"
-#include "ExternC.h"
-#include "Types.h"
+#include "llvm-c/DataTypes.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 15 - 15
src/llvm-c/Target.h

@@ -19,9 +19,9 @@
 #ifndef LLVM_C_TARGET_H
 #ifndef LLVM_C_TARGET_H
 #define LLVM_C_TARGET_H
 #define LLVM_C_TARGET_H
 
 
-#include "ExternC.h"
-#include "Types.h"
-#include "Config/llvm-config.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
+#include "llvm-c/Config/llvm-config.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 
@@ -40,34 +40,34 @@ typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef;
 /* Declare all of the target-initialization functions that are available. */
 /* Declare all of the target-initialization functions that are available. */
 #define LLVM_TARGET(TargetName) \
 #define LLVM_TARGET(TargetName) \
   void LLVMInitialize##TargetName##TargetInfo(void);
   void LLVMInitialize##TargetName##TargetInfo(void);
-#include "Config/Targets.def"
+#include "llvm-c/Config/Targets.def"
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 
 
 #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target(void);
 #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target(void);
-#include "Config/Targets.def"
+#include "llvm-c/Config/Targets.def"
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 
 
 #define LLVM_TARGET(TargetName) \
 #define LLVM_TARGET(TargetName) \
   void LLVMInitialize##TargetName##TargetMC(void);
   void LLVMInitialize##TargetName##TargetMC(void);
-#include "Config/Targets.def"
+#include "llvm-c/Config/Targets.def"
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 
 
 /* Declare all of the available assembly printer initialization functions. */
 /* Declare all of the available assembly printer initialization functions. */
 #define LLVM_ASM_PRINTER(TargetName) \
 #define LLVM_ASM_PRINTER(TargetName) \
   void LLVMInitialize##TargetName##AsmPrinter(void);
   void LLVMInitialize##TargetName##AsmPrinter(void);
-#include "Config/AsmPrinters.def"
+#include "llvm-c/Config/AsmPrinters.def"
 #undef LLVM_ASM_PRINTER  /* Explicit undef to make SWIG happier */
 #undef LLVM_ASM_PRINTER  /* Explicit undef to make SWIG happier */
 
 
 /* Declare all of the available assembly parser initialization functions. */
 /* Declare all of the available assembly parser initialization functions. */
 #define LLVM_ASM_PARSER(TargetName) \
 #define LLVM_ASM_PARSER(TargetName) \
   void LLVMInitialize##TargetName##AsmParser(void);
   void LLVMInitialize##TargetName##AsmParser(void);
-#include "Config/AsmParsers.def"
+#include "llvm-c/Config/AsmParsers.def"
 #undef LLVM_ASM_PARSER  /* Explicit undef to make SWIG happier */
 #undef LLVM_ASM_PARSER  /* Explicit undef to make SWIG happier */
 
 
 /* Declare all of the available disassembler initialization functions. */
 /* Declare all of the available disassembler initialization functions. */
 #define LLVM_DISASSEMBLER(TargetName) \
 #define LLVM_DISASSEMBLER(TargetName) \
   void LLVMInitialize##TargetName##Disassembler(void);
   void LLVMInitialize##TargetName##Disassembler(void);
-#include "Config/Disassemblers.def"
+#include "llvm-c/Config/Disassemblers.def"
 #undef LLVM_DISASSEMBLER  /* Explicit undef to make SWIG happier */
 #undef LLVM_DISASSEMBLER  /* Explicit undef to make SWIG happier */
 
 
 /** LLVMInitializeAllTargetInfos - The main program should call this function if
 /** LLVMInitializeAllTargetInfos - The main program should call this function if
@@ -75,7 +75,7 @@ typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef;
     support. */
     support. */
 static inline void LLVMInitializeAllTargetInfos(void) {
 static inline void LLVMInitializeAllTargetInfos(void) {
 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
-#include "Config/Targets.def"
+#include "llvm-c/Config/Targets.def"
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 }
 }
 
 
@@ -84,7 +84,7 @@ static inline void LLVMInitializeAllTargetInfos(void) {
     support. */
     support. */
 static inline void LLVMInitializeAllTargets(void) {
 static inline void LLVMInitializeAllTargets(void) {
 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
-#include "Config/Targets.def"
+#include "llvm-c/Config/Targets.def"
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 }
 }
 
 
@@ -93,7 +93,7 @@ static inline void LLVMInitializeAllTargets(void) {
     support. */
     support. */
 static inline void LLVMInitializeAllTargetMCs(void) {
 static inline void LLVMInitializeAllTargetMCs(void) {
 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC();
 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC();
-#include "Config/Targets.def"
+#include "llvm-c/Config/Targets.def"
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 }
 }
 
 
@@ -102,7 +102,7 @@ static inline void LLVMInitializeAllTargetMCs(void) {
     available via the TargetRegistry. */
     available via the TargetRegistry. */
 static inline void LLVMInitializeAllAsmPrinters(void) {
 static inline void LLVMInitializeAllAsmPrinters(void) {
 #define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
 #define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
-#include "Config/AsmPrinters.def"
+#include "llvm-c/Config/AsmPrinters.def"
 #undef LLVM_ASM_PRINTER  /* Explicit undef to make SWIG happier */
 #undef LLVM_ASM_PRINTER  /* Explicit undef to make SWIG happier */
 }
 }
 
 
@@ -111,7 +111,7 @@ static inline void LLVMInitializeAllAsmPrinters(void) {
     available via the TargetRegistry. */
     available via the TargetRegistry. */
 static inline void LLVMInitializeAllAsmParsers(void) {
 static inline void LLVMInitializeAllAsmParsers(void) {
 #define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
 #define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
-#include "Config/AsmParsers.def"
+#include "llvm-c/Config/AsmParsers.def"
 #undef LLVM_ASM_PARSER  /* Explicit undef to make SWIG happier */
 #undef LLVM_ASM_PARSER  /* Explicit undef to make SWIG happier */
 }
 }
 
 
@@ -121,7 +121,7 @@ static inline void LLVMInitializeAllAsmParsers(void) {
 static inline void LLVMInitializeAllDisassemblers(void) {
 static inline void LLVMInitializeAllDisassemblers(void) {
 #define LLVM_DISASSEMBLER(TargetName) \
 #define LLVM_DISASSEMBLER(TargetName) \
   LLVMInitialize##TargetName##Disassembler();
   LLVMInitialize##TargetName##Disassembler();
-#include "Config/Disassemblers.def"
+#include "llvm-c/Config/Disassemblers.def"
 #undef LLVM_DISASSEMBLER  /* Explicit undef to make SWIG happier */
 #undef LLVM_DISASSEMBLER  /* Explicit undef to make SWIG happier */
 }
 }
 
 

+ 3 - 3
src/llvm-c/TargetMachine.h

@@ -19,9 +19,9 @@
 #ifndef LLVM_C_TARGETMACHINE_H
 #ifndef LLVM_C_TARGETMACHINE_H
 #define LLVM_C_TARGETMACHINE_H
 #define LLVM_C_TARGETMACHINE_H
 
 
-#include "ExternC.h"
-#include "Target.h"
-#include "Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Target.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Transforms/AggressiveInstCombine.h

@@ -15,8 +15,8 @@
 #ifndef LLVM_C_TRANSFORMS_AGGRESSIVEINSTCOMBINE_H
 #ifndef LLVM_C_TRANSFORMS_AGGRESSIVEINSTCOMBINE_H
 #define LLVM_C_TRANSFORMS_AGGRESSIVEINSTCOMBINE_H
 #define LLVM_C_TRANSFORMS_AGGRESSIVEINSTCOMBINE_H
 
 
-#include "../ExternC.h"
-#include "../Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 3 - 3
src/llvm-c/Transforms/Coroutines.h

@@ -19,9 +19,9 @@
 #ifndef LLVM_C_TRANSFORMS_COROUTINES_H
 #ifndef LLVM_C_TRANSFORMS_COROUTINES_H
 #define LLVM_C_TRANSFORMS_COROUTINES_H
 #define LLVM_C_TRANSFORMS_COROUTINES_H
 
 
-#include "../ExternC.h"
-#include "../Types.h"
-#include "PassManagerBuilder.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
+#include "llvm-c/Transforms/PassManagerBuilder.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 5
src/llvm-c/Transforms/IPO.h

@@ -15,8 +15,8 @@
 #ifndef LLVM_C_TRANSFORMS_IPO_H
 #ifndef LLVM_C_TRANSFORMS_IPO_H
 #define LLVM_C_TRANSFORMS_IPO_H
 #define LLVM_C_TRANSFORMS_IPO_H
 
 
-#include "../ExternC.h"
-#include "../Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 
@@ -57,9 +57,6 @@ void LLVMAddGlobalDCEPass(LLVMPassManagerRef PM);
 /** See llvm::createGlobalOptimizerPass function. */
 /** See llvm::createGlobalOptimizerPass function. */
 void LLVMAddGlobalOptimizerPass(LLVMPassManagerRef PM);
 void LLVMAddGlobalOptimizerPass(LLVMPassManagerRef PM);
 
 
-/** See llvm::createIPConstantPropagationPass function. */
-void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM);
-
 /** See llvm::createPruneEHPass function. */
 /** See llvm::createPruneEHPass function. */
 void LLVMAddPruneEHPass(LLVMPassManagerRef PM);
 void LLVMAddPruneEHPass(LLVMPassManagerRef PM);
 
 

+ 2 - 2
src/llvm-c/Transforms/InstCombine.h

@@ -15,8 +15,8 @@
 #ifndef LLVM_C_TRANSFORMS_INSTCOMBINE_H
 #ifndef LLVM_C_TRANSFORMS_INSTCOMBINE_H
 #define LLVM_C_TRANSFORMS_INSTCOMBINE_H
 #define LLVM_C_TRANSFORMS_INSTCOMBINE_H
 
 
-#include "../ExternC.h"
-#include "../Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Transforms/PassManagerBuilder.h

@@ -14,8 +14,8 @@
 #ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
 #ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
 #define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
 #define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
 
 
-#include "../ExternC.h"
-#include "../Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
 typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
 
 

+ 5 - 5
src/llvm-c/Transforms/Scalar.h

@@ -19,8 +19,8 @@
 #ifndef LLVM_C_TRANSFORMS_SCALAR_H
 #ifndef LLVM_C_TRANSFORMS_SCALAR_H
 #define LLVM_C_TRANSFORMS_SCALAR_H
 #define LLVM_C_TRANSFORMS_SCALAR_H
 
 
-#include "../ExternC.h"
-#include "../Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 
@@ -67,6 +67,9 @@ void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM);
 /** See llvm::createInstructionCombiningPass function. */
 /** See llvm::createInstructionCombiningPass function. */
 void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
 void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
 
 
+/** See llvm::createInstSimplifyLegacyPass function. */
+void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM);
+
 /** See llvm::createJumpThreadingPass function. */
 /** See llvm::createJumpThreadingPass function. */
 void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM);
 void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM);
 
 
@@ -125,9 +128,6 @@ void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM);
 /** See llvm::createTailCallEliminationPass function. */
 /** See llvm::createTailCallEliminationPass function. */
 void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM);
 void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM);
 
 
-/** See llvm::createConstantPropagationPass function. */
-void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM);
-
 /** See llvm::demotePromoteMemoryToRegisterPass function. */
 /** See llvm::demotePromoteMemoryToRegisterPass function. */
 void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM);
 void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM);
 
 

+ 2 - 2
src/llvm-c/Transforms/Utils.h

@@ -19,8 +19,8 @@
 #ifndef LLVM_C_TRANSFORMS_UTILS_H
 #ifndef LLVM_C_TRANSFORMS_UTILS_H
 #define LLVM_C_TRANSFORMS_UTILS_H
 #define LLVM_C_TRANSFORMS_UTILS_H
 
 
-#include "../ExternC.h"
-#include "../Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Transforms/Vectorize.h

@@ -20,8 +20,8 @@
 #ifndef LLVM_C_TRANSFORMS_VECTORIZE_H
 #ifndef LLVM_C_TRANSFORMS_VECTORIZE_H
 #define LLVM_C_TRANSFORMS_VECTORIZE_H
 #define LLVM_C_TRANSFORMS_VECTORIZE_H
 
 
-#include "../ExternC.h"
-#include "../Types.h"
+#include "llvm-c/ExternC.h"
+#include "llvm-c/Types.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 2 - 2
src/llvm-c/Types.h

@@ -14,8 +14,8 @@
 #ifndef LLVM_C_TYPES_H
 #ifndef LLVM_C_TYPES_H
 #define LLVM_C_TYPES_H
 #define LLVM_C_TYPES_H
 
 
-#include "DataTypes.h"
-#include "ExternC.h"
+#include "llvm-c/DataTypes.h"
+#include "llvm-c/ExternC.h"
 
 
 LLVM_C_EXTERN_C_BEGIN
 LLVM_C_EXTERN_C_BEGIN
 
 

+ 1 - 1
src/llvm-c/lto.h

@@ -16,7 +16,7 @@
 #ifndef LLVM_C_LTO_H
 #ifndef LLVM_C_LTO_H
 #define LLVM_C_LTO_H
 #define LLVM_C_LTO_H
 
 
-#include "ExternC.h"
+#include "llvm-c/ExternC.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 #include <cstddef>
 #include <cstddef>

+ 2 - 0
src/llvm_backend.cpp

@@ -23,6 +23,8 @@
 
 
 #if LLVM_VERSION_MAJOR < 11 
 #if LLVM_VERSION_MAJOR < 11 
 #error "LLVM Version 11 is the minimum required"
 #error "LLVM Version 11 is the minimum required"
+#elif LLVM_VERSION_MAJOR == 12 && !(LLVM_VERSION_MINOR > 0 || LLVM_VERSION_PATCH > 0)
+#error "If LLVM Version 12.x.y is wanted, at least LLVM 12.0.1 is required"
 #endif
 #endif