compiler: refactor parseTypeAssert

Move to the builder object, and rename to createTypeAssert.
This commit is contained in:
Ayke van Laethem
2019-11-23 00:09:13 +01:00
committed by Ron Evans
parent 349ecf1736
commit 7733666fa8
3 changed files with 32 additions and 27 deletions
+5
View File
@@ -52,6 +52,11 @@ func (c *Compiler) emitPointerUnpack(ptr llvm.Value, valueTypes []llvm.Type) []l
return llvmutil.EmitPointerUnpack(c.builder, c.mod, ptr, valueTypes)
}
// emitPointerUnpack extracts a list of values packed using emitPointerPack.
func (b *builder) emitPointerUnpack(ptr llvm.Value, valueTypes []llvm.Type) []llvm.Value {
return llvmutil.EmitPointerUnpack(b.Builder, b.mod, ptr, valueTypes)
}
// makeGlobalArray creates a new LLVM global with the given name and integers as
// contents, and returns the global.
// Note that it is left with the default linkage etc., you should set