From 5efeb2fea0631573d8720535caf4a3a9bc09c828 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 25 Jul 2020 02:09:13 +0100 Subject: [PATCH] compiler: Consistently use llunit through llvm_ir_generator [nfc] --- artiq/compiler/transforms/llvm_ir_generator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 0d753c991..9eed011d9 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -209,7 +209,7 @@ class LLVMIRGenerator: if for_return: return llvoid else: - return ll.LiteralStructType([]) + return llunit elif types._is_pointer(typ): return llptr elif types.is_function(typ): @@ -239,7 +239,7 @@ class LLVMIRGenerator: if for_return: return llvoid else: - return ll.LiteralStructType([]) + return llunit elif builtins.is_bool(typ): return lli1 elif builtins.is_int(typ): @@ -1357,7 +1357,7 @@ class LLVMIRGenerator: name="rpc.args") for index, arg in enumerate(args): if builtins.is_none(arg.type): - llargslot = self.llbuilder.alloca(ll.LiteralStructType([]), + llargslot = self.llbuilder.alloca(llunit, name="rpc.arg{}".format(index)) else: llarg = self.map(arg)