Removed some unused code.
This commit is contained in:
parent
5d004f4286
commit
272fbe3504
1 changed files with 8 additions and 1 deletions
|
|
@ -98,7 +98,8 @@ type Args = [(LLVMType, LLVMValue)]
|
||||||
|
|
||||||
-- | A datatype which represents different instructions in LLVM
|
-- | A datatype which represents different instructions in LLVM
|
||||||
data LLVMIr
|
data LLVMIr
|
||||||
= Define CallingConvention LLVMType Ident Params
|
= Type Ident [LLVMType]
|
||||||
|
| Define CallingConvention LLVMType Ident Params
|
||||||
| DefineEnd
|
| DefineEnd
|
||||||
| Declare LLVMType Ident Params
|
| Declare LLVMType Ident Params
|
||||||
| SetVariable Ident LLVMIr
|
| SetVariable Ident LLVMIr
|
||||||
|
|
@ -143,6 +144,12 @@ llvmIrToString = go 0
|
||||||
insToString :: Int -> LLVMIr -> String
|
insToString :: Int -> LLVMIr -> String
|
||||||
insToString i l =
|
insToString i l =
|
||||||
replicate i '\t' <> case l of
|
replicate i '\t' <> case l of
|
||||||
|
(Type (Ident n) types) ->
|
||||||
|
concat
|
||||||
|
[ "%", n, " = {"
|
||||||
|
, intercalate " , " (map show types)
|
||||||
|
, "}"
|
||||||
|
]
|
||||||
(Define c t (Ident i) params) ->
|
(Define c t (Ident i) params) ->
|
||||||
concat
|
concat
|
||||||
[ "define ", show c, " ", show t, " @", i
|
[ "define ", show c, " ", show t, " @", i
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue