comparison tools/binding/llvm/type.d @ 1274:4ff9ab0d472c

Check in some old changes to the binding, from before I had commit access. - Add bindings for InsertValue and ExtractValue - Updates to use new APIs where they were renamed or removed. - Add generic error messages if LLVM didn't provide one. - Enable typesafe variadic arguments for GetGEP.
author Frits van Bommel <fvbommel wxs.nl>
date Mon, 27 Apr 2009 22:34:36 +0200
parents 1ba61de8796b
children
comparison
equal deleted inserted replaced
1273:1ba61de8796b 1274:4ff9ab0d472c
109 * if it can, or null otherwise. 109 * if it can, or null otherwise.
110 */ 110 */
111 Type refineAbstractType(Type to) { 111 Type refineAbstractType(Type to) {
112 assert(isAbstract()); 112 assert(isAbstract());
113 113
114 LLVMRefineAbstractType(type, to.type); 114 LLVMRefineType(type, to.type);
115 115
116 // Either type will do. Go through the registry to try to use the 116 // Either type will do. Go through the registry to try to use the
117 // "canonical" Type object for the type. 117 // "canonical" Type object for the type.
118 if (type != null && to.type != null) { 118 if (type != null && to.type != null) {
119 assert(type == to.type, "After refinement they should be equal, right?"); 119 assert(type == to.type, "After refinement they should be equal, right?");