예제 #1
0
 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
 }
예제 #2
0
 private LLVM.Value ConvertPointer(LLVM.Value v, LLVM.Type toType)
 {
     Trace.Assert(v.Type.isPointer() && toType.isPointer());
     return(_builder.CreateBitCast(v, toType));
 }