C bindings for libLLVMCore.a and libLLVMBitWriter.a.
authorGordon Henriksen <gordonhenriksen@mac.com>
Tue, 18 Sep 2007 03:18:57 +0000 (03:18 +0000)
committerGordon Henriksen <gordonhenriksen@mac.com>
Tue, 18 Sep 2007 03:18:57 +0000 (03:18 +0000)
commit8b94a14a782867b1da1f272b6f502562d0c2a1aa
tree6451f3fb779575788cdbd7c876ed185d450566b8
parent04bdf20ec1da00891e9903847613574c6f0505d2
C bindings for libLLVMCore.a and libLLVMBitWriter.a.

- The naming prefix is LLVM.
- All types are represented using opaque references.
- Functions are not named LLVM{Type}{Method}; the names became
  unreadable goop. Instead, they are named LLVM{ImperativeSentence}.
- Where an attribute only appears once in the class hierarchy (e.g.,
  linkage only applies to values; parameter types only apply to
  function types), the class is omitted from identifiers for
  brevity. Tastes like methods.
- Strings are C strings or string/length tuples on a case-by-case
  basis.
- APIs which give the caller ownership of an object are not mapped
  (removeFromParent, certain constructor overloads). This keeps
  keep memory management as simple as possible.

For each library with bindings:

  llvm-c/<LIB>.h       - Declares the bindings.
  lib/<LIB>/<LIB>.cpp  - Implements the bindings.

So just link with the library of your choice and use the C header
instead of the C++ one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42077 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm-c/BitWriter.h [new file with mode: 0644]
include/llvm-c/Core.h [new file with mode: 0644]
include/llvm/CHelpers.h [new file with mode: 0644]
lib/Bitcode/Writer/BitWriter.cpp [new file with mode: 0644]
lib/VMCore/Core.cpp [new file with mode: 0644]