compiler: use a fresh context for every compilation

This commit is contained in:
Ayke van Laethem
2018-10-08 20:18:12 +02:00
parent a63af97e86
commit 3289dd7134
2 changed files with 125 additions and 125 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ func (c *Compiler) collapseFormalParamInternal(t llvm.Type, fields []llvm.Value)
switch t.TypeKind() {
case llvm.StructTypeKind:
if len(c.flattenAggregateType(t)) <= MaxFieldsPerParam {
value, err := getZeroValue(t)
value, err := c.getZeroValue(t)
if err != nil {
panic("could not get zero value of struct: " + err.Error())
}