private LLVM.Value ConvertToType(LLVM.Value v, LLVM.Type toType) { LLVM.Type vType = v.Type; if (vType.isPointer() && toType.isPointer()) { return(ConvertPointer(v, toType)); } Console.WriteLine("v was not converted to toType"); return(v); // TODO, FIXME }
private LLVM.Value ConvertPointer(LLVM.Value v, LLVM.Type toType) { Trace.Assert(v.Type.isPointer() && toType.isPointer()); return(_builder.CreateBitCast(v, toType)); }