From 272fbe350487beb6c700bede0312b2c52037b247 Mon Sep 17 00:00:00 2001 From: Samuel Hammersberg Date: Fri, 24 Feb 2023 09:29:55 +0100 Subject: [PATCH] Removed some unused code. --- src/LlvmIr.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/LlvmIr.hs b/src/LlvmIr.hs index 7fe40c0..b156edb 100644 --- a/src/LlvmIr.hs +++ b/src/LlvmIr.hs @@ -98,7 +98,8 @@ type Args = [(LLVMType, LLVMValue)] -- | A datatype which represents different instructions in LLVM data LLVMIr - = Define CallingConvention LLVMType Ident Params + = Type Ident [LLVMType] + | Define CallingConvention LLVMType Ident Params | DefineEnd | Declare LLVMType Ident Params | SetVariable Ident LLVMIr @@ -143,6 +144,12 @@ llvmIrToString = go 0 insToString :: Int -> LLVMIr -> String insToString i l = replicate i '\t' <> case l of + (Type (Ident n) types) -> + concat + [ "%", n, " = {" + , intercalate " , " (map show types) + , "}" + ] (Define c t (Ident i) params) -> concat [ "define ", show c, " ", show t, " @", i