diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-10-07 00:13:35 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-10-07 00:13:35 +0000 |
commit | 1cf08fddc7413076dedad58dbb8d8d67e69a490f (patch) | |
tree | de2716f4caa6d2d7296465c0c0750b507a959648 /lib/VMCore/Core.cpp | |
parent | c0491ac8b6c24a7d0db8c0a60f76cfb1d66f84ab (diff) | |
download | external_llvm-1cf08fddc7413076dedad58dbb8d8d67e69a490f.zip external_llvm-1cf08fddc7413076dedad58dbb8d8d67e69a490f.tar.gz external_llvm-1cf08fddc7413076dedad58dbb8d8d67e69a490f.tar.bz2 |
C and Objective Caml bindings for PATypeHolder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 10b226c..15a54b3 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -177,6 +177,24 @@ LLVMTypeRef LLVMOpaqueType() { return wrap(llvm::OpaqueType::get()); } +/* Operations on type handles */ + +LLVMTypeHandleRef LLVMCreateTypeHandle(LLVMTypeRef PotentiallyAbstractTy) { + return wrap(new PATypeHolder(unwrap(PotentiallyAbstractTy))); +} + +void LLVMDisposeTypeHandle(LLVMTypeHandleRef TypeHandle) { + delete unwrap(TypeHandle); +} + +LLVMTypeRef LLVMResolveTypeHandle(LLVMTypeHandleRef TypeHandle) { + return wrap(unwrap(TypeHandle)->get()); +} + +void LLVMRefineType(LLVMTypeRef AbstractTy, LLVMTypeRef ConcreteTy) { + unwrap<DerivedType>(AbstractTy)->refineAbstractTypeTo(unwrap(ConcreteTy)); +} + /*===-- Operations on values ----------------------------------------------===*/ |