mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 00:36:36 +00:00
7c00d18607
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
55 lines
1.6 KiB
C
55 lines
1.6 KiB
C
/*===-- llvm-c/Support.h - Support C Interface --------------------*- C -*-===*\
|
|
|* *|
|
|
|* The LLVM Compiler Infrastructure *|
|
|
|* *|
|
|
|* This file is distributed under the University of Illinois Open Source *|
|
|
|* License. See LICENSE.TXT for details. *|
|
|
|* *|
|
|
|*===----------------------------------------------------------------------===*|
|
|
|* *|
|
|
|* This file defines the C interface to the LLVM support library. *|
|
|
|* *|
|
|
\*===----------------------------------------------------------------------===*/
|
|
|
|
#ifndef LLVM_C_SUPPORT_H
|
|
#define LLVM_C_SUPPORT_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.
|
|
*
|
|
* @see sys::DynamicLibrary::LoadLibraryPermanently()
|
|
*/
|
|
LLVMBool LLVMLoadLibraryPermanently(const char* Filename);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|