diff options
author | Ayke van Laethem <[email protected]> | 2019-11-23 00:09:13 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-03-25 20:17:46 +0100 |
commit | 7733666fa80ae85569bbc01e4af591900e71b34e (patch) | |
tree | 42d43cc282719ca2658964b20740aa50e950acee /compiler/llvm.go | |
parent | 349ecf17361afc3ab1e4d7d051fd5fa9adf34665 (diff) | |
download | tinygo-7733666fa80ae85569bbc01e4af591900e71b34e.tar.gz tinygo-7733666fa80ae85569bbc01e4af591900e71b34e.zip |
compiler: refactor parseTypeAssert
Move to the builder object, and rename to createTypeAssert.
Diffstat (limited to 'compiler/llvm.go')
-rw-r--r-- | compiler/llvm.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/llvm.go b/compiler/llvm.go index ff2b4c60c..30a96f427 100644 --- a/compiler/llvm.go +++ b/compiler/llvm.go @@ -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 |