diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h index 437023bfba6..bd150eaaae9 100644 --- a/include/llvm-c/Core.h +++ b/include/llvm-c/Core.h @@ -15,7 +15,7 @@ #ifndef LLVM_C_CORE_H #define LLVM_C_CORE_H -#include "llvm/Support/DataTypes.h" +#include "llvm-c/Support.h" #ifdef __cplusplus extern "C" { @@ -62,8 +62,6 @@ extern "C" { * @{ */ -typedef int LLVMBool; - /* Opaque types. */ /** @@ -114,13 +112,6 @@ typedef struct LLVMOpaqueBuilder *LLVMBuilderRef; */ typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef; -/** - * Used to provide a module to JIT or interpreter. - * - * @see llvm::MemoryBuffer - */ -typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef; - /** @see llvm::PassManagerBase */ typedef struct LLVMOpaquePassManager *LLVMPassManagerRef; diff --git a/include/llvm-c/Support.h b/include/llvm-c/Support.h index 7f03ede604a..4e6ff220b10 100644 --- a/include/llvm-c/Support.h +++ b/include/llvm-c/Support.h @@ -14,12 +14,31 @@ #ifndef LLVM_C_SUPPORT_H #define LLVM_C_SUPPORT_H -#include "llvm-c/Core.h" +#include "llvm/Support/DataTypes.h" #ifdef __cplusplus extern "C" { #endif +/** + * @defgroup LLVMCSupportTypes Types and Enumerations + * + * @{ + */ + +typedef int LLVMBool; + +/** + * Used to pass regions of memory through LLVM interfaces. + * + * @see llvm::MemoryBuffer + */ +typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef; + +/** + * @} + */ + /** * This function permanently loads the dynamic library at the given path. * It is safe to call this function multiple times for the same library. diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h index 1910d44240a..578c7e8eb88 100644 --- a/include/llvm/Support/MemoryBuffer.h +++ b/include/llvm/Support/MemoryBuffer.h @@ -14,7 +14,7 @@ #ifndef LLVM_SUPPORT_MEMORYBUFFER_H #define LLVM_SUPPORT_MEMORYBUFFER_H -#include "llvm-c/Core.h" +#include "llvm-c/Support.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/CBindingWrapping.h" #include "llvm/Support/Compiler.h"