[llvm] r255965 - Reorganize the C API headers to improve build times.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 17:51:22 PST 2015


Gack. My commit forgot the attribution:

Patch by Amaury SECHET!

Thanks!

On Thu, Dec 17, 2015 at 5:50 PM Eric Christopher via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: echristo
> Date: Thu Dec 17 19:46:52 2015
> New Revision: 255965
>
> URL: http://llvm.org/viewvc/llvm-project?rev=255965&view=rev
> Log:
> Reorganize the C API headers to improve build times.
>
> Type specific declarations have been moved to Type.h and error handling
> routines have been moved to ErrorHandling.h. Both are included in Core.h
> so nothing should change for projects directly including the headers,
> but transitive dependencies may be affected.
>
> Added:
>     llvm/trunk/include/llvm-c/ErrorHandling.h
>     llvm/trunk/include/llvm-c/Types.h
> Modified:
>     llvm/trunk/bindings/go/llvm/analysis.go
>     llvm/trunk/bindings/go/llvm/bitreader.go
>     llvm/trunk/bindings/go/llvm/executionengine.go
>     llvm/trunk/bindings/go/llvm/linker.go
>     llvm/trunk/bindings/go/llvm/target.go
>     llvm/trunk/docs/ReleaseNotes.rst
>     llvm/trunk/include/llvm-c/Analysis.h
>     llvm/trunk/include/llvm-c/BitReader.h
>     llvm/trunk/include/llvm-c/BitWriter.h
>     llvm/trunk/include/llvm-c/Core.h
>     llvm/trunk/include/llvm-c/ExecutionEngine.h
>     llvm/trunk/include/llvm-c/IRReader.h
>     llvm/trunk/include/llvm-c/Initialization.h
>     llvm/trunk/include/llvm-c/Linker.h
>     llvm/trunk/include/llvm-c/Object.h
>     llvm/trunk/include/llvm-c/Support.h
>     llvm/trunk/include/llvm-c/Target.h
>     llvm/trunk/include/llvm-c/TargetMachine.h
>     llvm/trunk/include/llvm-c/Transforms/IPO.h
>     llvm/trunk/include/llvm-c/Transforms/PassManagerBuilder.h
>     llvm/trunk/include/llvm-c/Transforms/Scalar.h
>     llvm/trunk/include/llvm-c/Transforms/Vectorize.h
>     llvm/trunk/include/llvm/IR/DiagnosticInfo.h
>     llvm/trunk/include/llvm/IR/LLVMContext.h
>     llvm/trunk/include/llvm/IR/Type.h
>     llvm/trunk/include/llvm/IR/Use.h
>     llvm/trunk/include/llvm/IR/Value.h
>     llvm/trunk/include/llvm/PassRegistry.h
>     llvm/trunk/include/llvm/Support/CBindingWrapping.h
>     llvm/trunk/include/llvm/Support/MemoryBuffer.h
>     llvm/trunk/lib/Bitcode/Reader/BitReader.cpp
>     llvm/trunk/lib/Support/ErrorHandling.cpp
>     llvm/trunk/lib/Support/PrettyStackTrace.cpp
>     llvm/trunk/tools/llvm-c-test/object.c
>     llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
>     llvm/trunk/unittests/IR/ConstantsTest.cpp
>     llvm/trunk/unittests/Linker/LinkModulesTest.cpp
>
> Modified: llvm/trunk/bindings/go/llvm/analysis.go
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/analysis.go?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/bindings/go/llvm/analysis.go (original)
> +++ llvm/trunk/bindings/go/llvm/analysis.go Thu Dec 17 19:46:52 2015
> @@ -15,6 +15,7 @@ package llvm
>
>  /*
>  #include "llvm-c/Analysis.h" // If you are getting an error here read
> bindings/go/README.txt
> +#include "llvm-c/Core.h"
>  #include <stdlib.h>
>  */
>  import "C"
>
> Modified: llvm/trunk/bindings/go/llvm/bitreader.go
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/bitreader.go?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/bindings/go/llvm/bitreader.go (original)
> +++ llvm/trunk/bindings/go/llvm/bitreader.go Thu Dec 17 19:46:52 2015
> @@ -15,6 +15,7 @@ package llvm
>
>  /*
>  #include "llvm-c/BitReader.h"
> +#include "llvm-c/Core.h"
>  #include <stdlib.h>
>  */
>  import "C"
>
> Modified: llvm/trunk/bindings/go/llvm/executionengine.go
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/executionengine.go?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/bindings/go/llvm/executionengine.go (original)
> +++ llvm/trunk/bindings/go/llvm/executionengine.go Thu Dec 17 19:46:52 2015
> @@ -14,6 +14,7 @@
>  package llvm
>
>  /*
> +#include "llvm-c/Core.h"
>  #include "llvm-c/ExecutionEngine.h"
>  #include <stdlib.h>
>  */
>
> Modified: llvm/trunk/bindings/go/llvm/linker.go
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/linker.go?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/bindings/go/llvm/linker.go (original)
> +++ llvm/trunk/bindings/go/llvm/linker.go Thu Dec 17 19:46:52 2015
> @@ -14,6 +14,7 @@
>  package llvm
>
>  /*
> +#include "llvm-c/Core.h"
>  #include "llvm-c/Linker.h"
>  #include <stdlib.h>
>  */
>
> Modified: llvm/trunk/bindings/go/llvm/target.go
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/target.go?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/bindings/go/llvm/target.go (original)
> +++ llvm/trunk/bindings/go/llvm/target.go Thu Dec 17 19:46:52 2015
> @@ -14,6 +14,7 @@
>  package llvm
>
>  /*
> +#include "llvm-c/Core.h"
>  #include "llvm-c/Target.h"
>  #include "llvm-c/TargetMachine.h"
>  #include <stdlib.h>
>
> Modified: llvm/trunk/docs/ReleaseNotes.rst
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.rst?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/docs/ReleaseNotes.rst (original)
> +++ llvm/trunk/docs/ReleaseNotes.rst Thu Dec 17 19:46:52 2015
> @@ -52,6 +52,12 @@ Non-comprehensive list of changes in thi
>  * The deprecated C APIs LLVMGetBitcodeModuleProviderInContext and
>    LLVMGetBitcodeModuleProvider have been removed.
>
> +* With this release, the C API headers have been reorganized to improve
> build
> +  time. Type specific declarations have been moved to Type.h, and error
> +  handling routines have been moved to ErrorHandling.h. Both are included
> in
> +  Core.h so nothing should change for projects directly including the
> headers,
> +  but transitive dependencies may be affected.
> +
>  .. NOTE
>     For small 1-3 sentence descriptions, just add an entry at the end of
>     this list. If your description won't fit comfortably in one bullet
>
> Modified: llvm/trunk/include/llvm-c/Analysis.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Analysis.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Analysis.h (original)
> +++ llvm/trunk/include/llvm-c/Analysis.h Thu Dec 17 19:46:52 2015
> @@ -19,7 +19,7 @@
>  #ifndef LLVM_C_ANALYSIS_H
>  #define LLVM_C_ANALYSIS_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
>
> Modified: llvm/trunk/include/llvm-c/BitReader.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/BitReader.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/BitReader.h (original)
> +++ llvm/trunk/include/llvm-c/BitReader.h Thu Dec 17 19:46:52 2015
> @@ -19,7 +19,7 @@
>  #ifndef LLVM_C_BITREADER_H
>  #define LLVM_C_BITREADER_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
>
> Modified: llvm/trunk/include/llvm-c/BitWriter.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/BitWriter.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/BitWriter.h (original)
> +++ llvm/trunk/include/llvm-c/BitWriter.h Thu Dec 17 19:46:52 2015
> @@ -19,7 +19,7 @@
>  #ifndef LLVM_C_BITWRITER_H
>  #define LLVM_C_BITWRITER_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
>
> Modified: llvm/trunk/include/llvm-c/Core.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Core.h (original)
> +++ llvm/trunk/include/llvm-c/Core.h Thu Dec 17 19:46:52 2015
> @@ -15,7 +15,8 @@
>  #ifndef LLVM_C_CORE_H
>  #define LLVM_C_CORE_H
>
> -#include "llvm-c/Support.h"
> +#include "llvm-c/ErrorHandling.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
> @@ -40,15 +41,6 @@ extern "C" {
>   * the LLVM intermediate representation as well as other related types
>   * and utilities.
>   *
> - * LLVM uses a polymorphic type hierarchy which C cannot represent,
> therefore
> - * parameters must be passed as base types. Despite the declared types,
> most
> - * of the functions provided operate only on branches of the type
> hierarchy.
> - * The declared parameter names are descriptive and specify which type is
> - * required. Additionally, each type hierarchy is documented along with
> the
> - * functions that operate upon it. For more detail, refer to LLVM's C++
> code.
> - * If in doubt, refer to Core.cpp, which performs parameter downcasts in
> the
> - * form unwrap<RequiredType>(Param).
> - *
>   * 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.
> @@ -62,74 +54,6 @@ extern "C" {
>   * @{
>   */
>
> -/* Opaque types. */
> -
> -/**
> - * The top-level container for all LLVM global data. See the LLVMContext
> class.
> - */
> -typedef struct LLVMOpaqueContext *LLVMContextRef;
> -
> -/**
> - * The top-level container for all other LLVM Intermediate Representation
> (IR)
> - * objects.
> - *
> - * @see llvm::Module
> - */
> -typedef struct LLVMOpaqueModule *LLVMModuleRef;
> -
> -/**
> - * Each value in the LLVM IR has a type, an LLVMTypeRef.
> - *
> - * @see llvm::Type
> - */
> -typedef struct LLVMOpaqueType *LLVMTypeRef;
> -
> -/**
> - * Represents an individual value in LLVM IR.
> - *
> - * This models llvm::Value.
> - */
> -typedef struct LLVMOpaqueValue *LLVMValueRef;
> -
> -/**
> - * Represents a basic block of instructions in LLVM IR.
> - *
> - * This models llvm::BasicBlock.
> - */
> -typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef;
> -
> -/**
> - * Represents an LLVM basic block builder.
> - *
> - * This models llvm::IRBuilder.
> - */
> -typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
> -
> -/**
> - * Interface used to provide a module to JIT or interpreter.
> - * This is now just a synonym for llvm::Module, but we have to keep using
> the
> - * different type to keep binary compatibility.
> - */
> -typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef;
> -
> -/** @see llvm::PassManagerBase */
> -typedef struct LLVMOpaquePassManager *LLVMPassManagerRef;
> -
> -/** @see llvm::PassRegistry */
> -typedef struct LLVMOpaquePassRegistry *LLVMPassRegistryRef;
> -
> -/**
> - * Used to get the users and usees of a Value.
> - *
> - * @see llvm::Use */
> -typedef struct LLVMOpaqueUse *LLVMUseRef;
> -
> -
> -/**
> - * @see llvm::DiagnosticInfo
> - */
> -typedef struct LLVMOpaqueDiagnosticInfo *LLVMDiagnosticInfoRef;
> -
>  typedef enum {
>      LLVMZExtAttribute       = 1<<0,
>      LLVMSExtAttribute       = 1<<1,
> @@ -438,30 +362,6 @@ void LLVMShutdown(void);
>  char *LLVMCreateMessage(const char *Message);
>  void LLVMDisposeMessage(char *Message);
>
> -typedef void (*LLVMFatalErrorHandler)(const char *Reason);
> -
> -/**
> - * Install a fatal error handler. By default, if LLVM detects a fatal
> error, it
> - * will call exit(1). This may not be appropriate in many contexts. For
> example,
> - * doing exit(1) will bypass many crash reporting/tracing system tools.
> This
> - * function allows you to install a callback that will be invoked prior
> to the
> - * call to exit(1).
> - */
> -void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler);
> -
> -/**
> - * Reset the fatal error handler. This resets LLVM's fatal error handling
> - * behavior to the default.
> - */
> -void LLVMResetFatalErrorHandler(void);
> -
> -/**
> - * Enable LLVM's built-in stack trace code. This intercepts the OS's crash
> - * signals and prints which component of LLVM you were in at the time if
> the
> - * crash.
> - */
> -void LLVMEnablePrettyStackTrace(void);
> -
>  /**
>   * @defgroup LLVMCCoreContext Contexts
>   *
> @@ -2438,7 +2338,7 @@ void LLVMInstructionEraseFromParent(LLVM
>   *
>   * @see llvm::Instruction::getOpCode()
>   */
> -LLVMOpcode   LLVMGetInstructionOpcode(LLVMValueRef Inst);
> +LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst);
>
>  /**
>   * Obtain the predicate of an instruction.
>
> Added: llvm/trunk/include/llvm-c/ErrorHandling.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/ErrorHandling.h?rev=255965&view=auto
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/ErrorHandling.h (added)
> +++ llvm/trunk/include/llvm-c/ErrorHandling.h Thu Dec 17 19:46:52 2015
> @@ -0,0 +1,51 @@
> +/*===-- llvm-c/ErrorHandling.h - Error Handling 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 LLVM's error handling mechanism.
>     *|
> +|*
>     *|
>
> +\*===----------------------------------------------------------------------===*/
> +
> +#ifndef LLVM_C_ERROR_HANDLING_H
> +#define LLVM_C_ERROR_HANDLING_H
> +
> +#include "llvm-c/Types.h"
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +typedef void (*LLVMFatalErrorHandler)(const char *Reason);
> +
> +/**
> + * Install a fatal error handler. By default, if LLVM detects a fatal
> error, it
> + * will call exit(1). This may not be appropriate in many contexts. For
> example,
> + * doing exit(1) will bypass many crash reporting/tracing system tools.
> This
> + * function allows you to install a callback that will be invoked prior
> to the
> + * call to exit(1).
> + */
> +void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler);
> +
> +/**
> + * Reset the fatal error handler. This resets LLVM's fatal error handling
> + * behavior to the default.
> + */
> +void LLVMResetFatalErrorHandler(void);
> +
> +/**
> + * Enable LLVM's built-in stack trace code. This intercepts the OS's crash
> + * signals and prints which component of LLVM you were in at the time if
> the
> + * crash.
> + */
> +void LLVMEnablePrettyStackTrace(void);
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
>
> Modified: llvm/trunk/include/llvm-c/ExecutionEngine.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/ExecutionEngine.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/ExecutionEngine.h (original)
> +++ llvm/trunk/include/llvm-c/ExecutionEngine.h Thu Dec 17 19:46:52 2015
> @@ -19,7 +19,7 @@
>  #ifndef LLVM_C_EXECUTIONENGINE_H
>  #define LLVM_C_EXECUTIONENGINE_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>  #include "llvm-c/Target.h"
>  #include "llvm-c/TargetMachine.h"
>
>
> Modified: llvm/trunk/include/llvm-c/IRReader.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/IRReader.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/IRReader.h (original)
> +++ llvm/trunk/include/llvm-c/IRReader.h Thu Dec 17 19:46:52 2015
> @@ -14,7 +14,7 @@
>  #ifndef LLVM_C_IRREADER_H
>  #define LLVM_C_IRREADER_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
>
> Modified: llvm/trunk/include/llvm-c/Initialization.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Initialization.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Initialization.h (original)
> +++ llvm/trunk/include/llvm-c/Initialization.h Thu Dec 17 19:46:52 2015
> @@ -16,7 +16,7 @@
>  #ifndef LLVM_C_INITIALIZATION_H
>  #define LLVM_C_INITIALIZATION_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
>
> Modified: llvm/trunk/include/llvm-c/Linker.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Linker.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Linker.h (original)
> +++ llvm/trunk/include/llvm-c/Linker.h Thu Dec 17 19:46:52 2015
> @@ -14,7 +14,7 @@
>  #ifndef LLVM_C_LINKER_H
>  #define LLVM_C_LINKER_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
>
> Modified: llvm/trunk/include/llvm-c/Object.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Object.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Object.h (original)
> +++ llvm/trunk/include/llvm-c/Object.h Thu Dec 17 19:46:52 2015
> @@ -19,7 +19,7 @@
>  #ifndef LLVM_C_OBJECT_H
>  #define LLVM_C_OBJECT_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>  #include "llvm/Config/llvm-config.h"
>
>  #ifdef __cplusplus
>
> Modified: llvm/trunk/include/llvm-c/Support.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Support.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Support.h (original)
> +++ llvm/trunk/include/llvm-c/Support.h Thu Dec 17 19:46:52 2015
> @@ -15,31 +15,13 @@
>  #define LLVM_C_SUPPORT_H
>
>  #include "llvm/Support/DataTypes.h"
> +#include "llvm-c/Types.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.
>   *
>
> Modified: llvm/trunk/include/llvm-c/Target.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Target.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Target.h (original)
> +++ llvm/trunk/include/llvm-c/Target.h Thu Dec 17 19:46:52 2015
> @@ -19,7 +19,7 @@
>  #ifndef LLVM_C_TARGET_H
>  #define LLVM_C_TARGET_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>  #include "llvm/Config/llvm-config.h"
>
>  #if defined(_MSC_VER) && !defined(inline)
>
> Modified: llvm/trunk/include/llvm-c/TargetMachine.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/TargetMachine.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/TargetMachine.h (original)
> +++ llvm/trunk/include/llvm-c/TargetMachine.h Thu Dec 17 19:46:52 2015
> @@ -19,7 +19,7 @@
>  #ifndef LLVM_C_TARGETMACHINE_H
>  #define LLVM_C_TARGETMACHINE_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>  #include "llvm-c/Target.h"
>
>  #ifdef __cplusplus
>
> Modified: llvm/trunk/include/llvm-c/Transforms/IPO.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Transforms/IPO.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Transforms/IPO.h (original)
> +++ llvm/trunk/include/llvm-c/Transforms/IPO.h Thu Dec 17 19:46:52 2015
> @@ -15,7 +15,7 @@
>  #ifndef LLVM_C_TRANSFORMS_IPO_H
>  #define LLVM_C_TRANSFORMS_IPO_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
>
> Modified: llvm/trunk/include/llvm-c/Transforms/PassManagerBuilder.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Transforms/PassManagerBuilder.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Transforms/PassManagerBuilder.h (original)
> +++ llvm/trunk/include/llvm-c/Transforms/PassManagerBuilder.h Thu Dec 17
> 19:46:52 2015
> @@ -14,7 +14,7 @@
>  #ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
>  #define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
>
>
> Modified: llvm/trunk/include/llvm-c/Transforms/Scalar.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Transforms/Scalar.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Transforms/Scalar.h (original)
> +++ llvm/trunk/include/llvm-c/Transforms/Scalar.h Thu Dec 17 19:46:52 2015
> @@ -19,7 +19,7 @@
>  #ifndef LLVM_C_TRANSFORMS_SCALAR_H
>  #define LLVM_C_TRANSFORMS_SCALAR_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
>
> Modified: llvm/trunk/include/llvm-c/Transforms/Vectorize.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Transforms/Vectorize.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Transforms/Vectorize.h (original)
> +++ llvm/trunk/include/llvm-c/Transforms/Vectorize.h Thu Dec 17 19:46:52
> 2015
> @@ -20,7 +20,7 @@
>  #ifndef LLVM_C_TRANSFORMS_VECTORIZE_H
>  #define LLVM_C_TRANSFORMS_VECTORIZE_H
>
> -#include "llvm-c/Core.h"
> +#include "llvm-c/Types.h"
>
>  #ifdef __cplusplus
>  extern "C" {
> @@ -51,4 +51,3 @@ void LLVMAddSLPVectorizePass(LLVMPassMan
>  #endif /* defined(__cplusplus) */
>
>  #endif
> -
>
> Added: llvm/trunk/include/llvm-c/Types.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Types.h?rev=255965&view=auto
>
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Types.h (added)
> +++ llvm/trunk/include/llvm-c/Types.h Thu Dec 17 19:46:52 2015
> @@ -0,0 +1,124 @@
> +/*===-- llvm-c/Support.h - C Interface Types declarations ---------*- 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 types used by the the C interface to LLVM.
>      *|
> +|*
>     *|
>
> +\*===----------------------------------------------------------------------===*/
> +
> +#ifndef LLVM_C_TYPES_H
> +#define LLVM_C_TYPES_H
> +
> +#include "llvm/Support/DataTypes.h"
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/**
> + * @defgroup LLVMCSupportTypes Types and Enumerations
> + *
> + * @{
> + */
> +
> +typedef int LLVMBool;
> +
> +/* Opaque types. */
> +
> +/**
> + * LLVM uses a polymorphic type hierarchy which C cannot represent,
> therefore
> + * parameters must be passed as base types. Despite the declared types,
> most
> + * of the functions provided operate only on branches of the type
> hierarchy.
> + * The declared parameter names are descriptive and specify which type is
> + * required. Additionally, each type hierarchy is documented along with
> the
> + * functions that operate upon it. For more detail, refer to LLVM's C++
> code.
> + * If in doubt, refer to Core.cpp, which performs parameter downcasts in
> the
> + * form unwrap<RequiredType>(Param).
> + */
> +
> +/**
> + * Used to pass regions of memory through LLVM interfaces.
> + *
> + * @see llvm::MemoryBuffer
> + */
> +typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef;
> +
> +/**
> + * The top-level container for all LLVM global data. See the LLVMContext
> class.
> + */
> +typedef struct LLVMOpaqueContext *LLVMContextRef;
> +
> +/**
> + * The top-level container for all other LLVM Intermediate Representation
> (IR)
> + * objects.
> + *
> + * @see llvm::Module
> + */
> +typedef struct LLVMOpaqueModule *LLVMModuleRef;
> +
> +/**
> + * Each value in the LLVM IR has a type, an LLVMTypeRef.
> + *
> + * @see llvm::Type
> + */
> +typedef struct LLVMOpaqueType *LLVMTypeRef;
> +
> +/**
> + * Represents an individual value in LLVM IR.
> + *
> + * This models llvm::Value.
> + */
> +typedef struct LLVMOpaqueValue *LLVMValueRef;
> +
> +/**
> + * Represents a basic block of instructions in LLVM IR.
> + *
> + * This models llvm::BasicBlock.
> + */
> +typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef;
> +
> +/**
> + * Represents an LLVM basic block builder.
> + *
> + * This models llvm::IRBuilder.
> + */
> +typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
> +
> +/**
> + * Interface used to provide a module to JIT or interpreter.
> + * This is now just a synonym for llvm::Module, but we have to keep using
> the
> + * different type to keep binary compatibility.
> + */
> +typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef;
> +
> +/** @see llvm::PassManagerBase */
> +typedef struct LLVMOpaquePassManager *LLVMPassManagerRef;
> +
> +/** @see llvm::PassRegistry */
> +typedef struct LLVMOpaquePassRegistry *LLVMPassRegistryRef;
> +
> +/**
> + * Used to get the users and usees of a Value.
> + *
> + * @see llvm::Use */
> +typedef struct LLVMOpaqueUse *LLVMUseRef;
> +
> +/**
> + * @see llvm::DiagnosticInfo
> + */
> +typedef struct LLVMOpaqueDiagnosticInfo *LLVMDiagnosticInfoRef;
> +
> +/**
> + * @}
> + */
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
>
> Modified: llvm/trunk/include/llvm/IR/DiagnosticInfo.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DiagnosticInfo.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)
> +++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Thu Dec 17 19:46:52 2015
> @@ -15,7 +15,6 @@
>  #ifndef LLVM_IR_DIAGNOSTICINFO_H
>  #define LLVM_IR_DIAGNOSTICINFO_H
>
> -#include "llvm-c/Core.h"
>  #include "llvm/ADT/ArrayRef.h"
>  #include "llvm/IR/DebugLoc.h"
>  #include "llvm/IR/Module.h"
>
> Modified: llvm/trunk/include/llvm/IR/LLVMContext.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/LLVMContext.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/LLVMContext.h (original)
> +++ llvm/trunk/include/llvm/IR/LLVMContext.h Thu Dec 17 19:46:52 2015
> @@ -15,7 +15,6 @@
>  #ifndef LLVM_IR_LLVMCONTEXT_H
>  #define LLVM_IR_LLVMCONTEXT_H
>
> -#include "llvm-c/Core.h"
>  #include "llvm/Support/CBindingWrapping.h"
>  #include "llvm/Support/Compiler.h"
>  #include "llvm/Support/Options.h"
>
> Modified: llvm/trunk/include/llvm/IR/Type.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Type.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/Type.h (original)
> +++ llvm/trunk/include/llvm/IR/Type.h Thu Dec 17 19:46:52 2015
> @@ -15,7 +15,6 @@
>  #ifndef LLVM_IR_TYPE_H
>  #define LLVM_IR_TYPE_H
>
> -#include "llvm-c/Core.h"
>  #include "llvm/ADT/APFloat.h"
>  #include "llvm/ADT/SmallPtrSet.h"
>  #include "llvm/Support/CBindingWrapping.h"
>
> Modified: llvm/trunk/include/llvm/IR/Use.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Use.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/Use.h (original)
> +++ llvm/trunk/include/llvm/IR/Use.h Thu Dec 17 19:46:52 2015
> @@ -25,7 +25,6 @@
>  #ifndef LLVM_IR_USE_H
>  #define LLVM_IR_USE_H
>
> -#include "llvm-c/Core.h"
>  #include "llvm/ADT/PointerIntPair.h"
>  #include "llvm/Support/CBindingWrapping.h"
>  #include "llvm/Support/Compiler.h"
>
> Modified: llvm/trunk/include/llvm/IR/Value.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Value.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/Value.h (original)
> +++ llvm/trunk/include/llvm/IR/Value.h Thu Dec 17 19:46:52 2015
> @@ -14,7 +14,6 @@
>  #ifndef LLVM_IR_VALUE_H
>  #define LLVM_IR_VALUE_H
>
> -#include "llvm-c/Core.h"
>  #include "llvm/ADT/iterator_range.h"
>  #include "llvm/IR/Use.h"
>  #include "llvm/Support/CBindingWrapping.h"
>
> Modified: llvm/trunk/include/llvm/PassRegistry.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassRegistry.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/PassRegistry.h (original)
> +++ llvm/trunk/include/llvm/PassRegistry.h Thu Dec 17 19:46:52 2015
> @@ -17,7 +17,6 @@
>  #ifndef LLVM_PASSREGISTRY_H
>  #define LLVM_PASSREGISTRY_H
>
> -#include "llvm-c/Core.h"
>  #include "llvm/ADT/DenseMap.h"
>  #include "llvm/ADT/SmallPtrSet.h"
>  #include "llvm/ADT/StringMap.h"
>
> Modified: llvm/trunk/include/llvm/Support/CBindingWrapping.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CBindingWrapping.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/CBindingWrapping.h (original)
> +++ llvm/trunk/include/llvm/Support/CBindingWrapping.h Thu Dec 17 19:46:52
> 2015
> @@ -15,6 +15,7 @@
>  #define LLVM_SUPPORT_CBINDINGWRAPPING_H
>
>  #include "llvm/Support/Casting.h"
> +#include "llvm-c/Types.h"
>
>  #define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)     \
>    inline ty *unwrap(ref P) {                            \
>
> Modified: llvm/trunk/include/llvm/Support/MemoryBuffer.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MemoryBuffer.h?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/MemoryBuffer.h (original)
> +++ llvm/trunk/include/llvm/Support/MemoryBuffer.h Thu Dec 17 19:46:52 2015
> @@ -14,7 +14,6 @@
>  #ifndef LLVM_SUPPORT_MEMORYBUFFER_H
>  #define LLVM_SUPPORT_MEMORYBUFFER_H
>
> -#include "llvm-c/Support.h"
>  #include "llvm/ADT/Twine.h"
>  #include "llvm/Support/CBindingWrapping.h"
>  #include "llvm/Support/DataTypes.h"
>
> Modified: llvm/trunk/lib/Bitcode/Reader/BitReader.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitReader.cpp?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Bitcode/Reader/BitReader.cpp (original)
> +++ llvm/trunk/lib/Bitcode/Reader/BitReader.cpp Thu Dec 17 19:46:52 2015
> @@ -8,6 +8,7 @@
>
>  //===----------------------------------------------------------------------===//
>
>  #include "llvm-c/BitReader.h"
> +#include "llvm-c/Core.h"
>  #include "llvm/Bitcode/ReaderWriter.h"
>  #include "llvm/IR/DiagnosticPrinter.h"
>  #include "llvm/IR/LLVMContext.h"
>
> Modified: llvm/trunk/lib/Support/ErrorHandling.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ErrorHandling.cpp?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Support/ErrorHandling.cpp (original)
> +++ llvm/trunk/lib/Support/ErrorHandling.cpp Thu Dec 17 19:46:52 2015
> @@ -13,7 +13,7 @@
>
>  //===----------------------------------------------------------------------===//
>
>  #include "llvm/Support/ErrorHandling.h"
> -#include "llvm-c/Core.h"
> +#include "llvm-c/ErrorHandling.h"
>  #include "llvm/ADT/SmallVector.h"
>  #include "llvm/ADT/Twine.h"
>  #include "llvm/Config/config.h"
>
> Modified: llvm/trunk/lib/Support/PrettyStackTrace.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PrettyStackTrace.cpp?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Support/PrettyStackTrace.cpp (original)
> +++ llvm/trunk/lib/Support/PrettyStackTrace.cpp Thu Dec 17 19:46:52 2015
> @@ -13,7 +13,7 @@
>
>  //===----------------------------------------------------------------------===//
>
>  #include "llvm/Support/PrettyStackTrace.h"
> -#include "llvm-c/Core.h"
> +#include "llvm-c/ErrorHandling.h"
>  #include "llvm/ADT/SmallString.h"
>  #include "llvm/Config/config.h"     // Get autoconf configuration settings
>  #include "llvm/Support/Compiler.h"
>
> Modified: llvm/trunk/tools/llvm-c-test/object.c
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-c-test/object.c?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/llvm-c-test/object.c (original)
> +++ llvm/trunk/tools/llvm-c-test/object.c Thu Dec 17 19:46:52 2015
> @@ -13,6 +13,7 @@
>
>  \*===----------------------------------------------------------------------===*/
>
>  #include "llvm-c-test.h"
> +#include "llvm-c/Core.h"
>  #include "llvm-c/Object.h"
>  #include <stdio.h>
>  #include <stdlib.h>
>
> Modified: llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp (original)
> +++ llvm/trunk/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp Thu Dec 17
> 19:46:52 2015
> @@ -9,6 +9,7 @@
>
>  #include "OrcTestCommon.h"
>  #include "gtest/gtest.h"
> +#include "llvm-c/Core.h"
>  #include "llvm-c/OrcBindings.h"
>  #include "llvm-c/Target.h"
>  #include "llvm-c/TargetMachine.h"
>
> Modified: llvm/trunk/unittests/IR/ConstantsTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/ConstantsTest.cpp?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/unittests/IR/ConstantsTest.cpp (original)
> +++ llvm/trunk/unittests/IR/ConstantsTest.cpp Thu Dec 17 19:46:52 2015
> @@ -15,6 +15,7 @@
>  #include "llvm/IR/LLVMContext.h"
>  #include "llvm/IR/Module.h"
>  #include "llvm/Support/SourceMgr.h"
> +#include "llvm-c/Core.h"
>  #include "gtest/gtest.h"
>
>  namespace llvm {
>
> Modified: llvm/trunk/unittests/Linker/LinkModulesTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Linker/LinkModulesTest.cpp?rev=255965&r1=255964&r2=255965&view=diff
>
> ==============================================================================
> --- llvm/trunk/unittests/Linker/LinkModulesTest.cpp (original)
> +++ llvm/trunk/unittests/Linker/LinkModulesTest.cpp Thu Dec 17 19:46:52
> 2015
> @@ -16,6 +16,7 @@
>  #include "llvm/IR/Module.h"
>  #include "llvm/Linker/Linker.h"
>  #include "llvm/Support/SourceMgr.h"
> +#include "llvm-c/Core.h"
>  #include "llvm-c/Linker.h"
>  #include "gtest/gtest.h"
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151218/713030ba/attachment.html>


More information about the llvm-commits mailing list