Permalink
Browse files

added mdNode and mdNodeInContext functions

  • Loading branch information...
1 parent cf37098 commit 1b8c7c6726094112b45c1fdc78f68364b96037fe @keithshep committed Nov 1, 2012
Showing with 12 additions and 0 deletions.
  1. +5 −0 LLVMFSharp.fsi
  2. +7 −0 src/LLVM/Core.fs
View
@@ -1424,6 +1424,11 @@ namespace LLVM
Generated.Core.TypeRef -> Generated.Core.TypeRef []
val createMemoryBufferWithContentsOfFile :
string -> Generated.Core.MemoryBufferRef
+ val mdNode : Generated.Core.ValueRef array -> Generated.Core.ValueRef
+ val mdNodeInContext :
+ Generated.Core.ContextRef ->
+ Generated.Core.ValueRef array -> Generated.Core.ValueRef
+ val constInt1 : bool -> Generated.Core.ValueRef
val constUInt8 : uint8 -> Generated.Core.ValueRef
val constInt8 : int8 -> Generated.Core.ValueRef
val constUInt16 : uint16 -> Generated.Core.ValueRef
View
@@ -136,6 +136,13 @@ let createMemoryBufferWithContentsOfFile (path : string) =
Marshal.FreeHGlobal buffPtr
Marshal.FreeHGlobal strPtr
+let mdNode (vals:ValueRef array) : ValueRef =
+ use valPtrs = new NativePtrs([|for v in vals -> v.Ptr|])
+ new ValueRef(mDNodeNative(valPtrs.Ptrs, uint32 vals.Length))
+let mdNodeInContext (ctxt:ContextRef) (vals:ValueRef array) : ValueRef =
+ use valPtrs = new NativePtrs([|for v in vals -> v.Ptr|])
+ new ValueRef(mDNodeInContextNative(ctxt.Ptr, valPtrs.Ptrs, uint32 vals.Length))
+
let constUInt8 (i:uint8) : ValueRef =
constInt (int8Type()) (uint64 i) false
let constInt8 (i:int8) : ValueRef =

0 comments on commit 1b8c7c6

Please sign in to comment.