summaryrefslogtreecommitdiff
path: root/include/llvm-c/Core.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-06 04:13:12 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-06 04:13:12 +0000
commit7c00d1860701e30d374295890be96f3ec43da82f (patch)
treec986af18bf4779cb01b4ba768312bc21a95b464b /include/llvm-c/Core.h
parentca7680b9987f329ecd9a5022f61b7b88272f8879 (diff)
downloadllvm-7c00d1860701e30d374295890be96f3ec43da82f.tar.gz
llvm-7c00d1860701e30d374295890be96f3ec43da82f.tar.bz2
llvm-7c00d1860701e30d374295890be96f3ec43da82f.tar.xz
[Modules] Fix a layering issue that is actually impacting the modules
selfhost. The 'Core.h' C-API header is part of the IR LLVM library. (One might even argue it should be called IR.h, but that's a separate point.) We can't include it into a Support header without violating the layering, and in a way that breaks modules. MemoryBuffer's opaque C type was being defined in the Core.h C-API header despite being in the Support library, and thus we ended up with this weird issue. It turns out that there were other constructs from the Support library in the Core.h header. This patch lifts all of them into Support.h and then includes that into Core.h. The only possible fallout is if someone was including Support.h and relying on Core.h to be visible for their own uses. Considering the narrow interface actually provided by the C-API for the Support library, this seems a very, very unlikely mistake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c/Core.h')
-rw-r--r--include/llvm-c/Core.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index 437023bfba..bd150eaaae 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;