From 57e759a1edfd7ae6b1d5368c542f6a68809d8799 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 b63cb881f..58177138b 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): @@ -1376,7 +1376,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)