forked from lcompilers/lpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
85 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"basename": "llvm-structs_11-09fea6a", | ||
"cmd": "lpython --no-color --show-llvm {infile} -o {outfile}", | ||
"infile": "tests/structs_11.py", | ||
"infile_hash": "9cb6c80ad837ba66472a91b22e9068ec439b6a2a179a452d90d84c78", | ||
"outfile": null, | ||
"outfile_hash": null, | ||
"stdout": "llvm-structs_11-09fea6a.stdout", | ||
"stdout_hash": "c6cdeacf6cdb7b9a5e68d2263a28585e68ec51e11f544fd366eac428", | ||
"stderr": null, | ||
"stderr_hash": null, | ||
"returncode": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
; ModuleID = 'LFortran' | ||
source_filename = "LFortran" | ||
|
||
%Bar = type { %Foo } | ||
%Foo = type { i32 } | ||
|
||
@bar = global %Bar zeroinitializer | ||
@0 = private unnamed_addr constant [2 x i8] c" \00", align 1 | ||
@1 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 | ||
@2 = private unnamed_addr constant [5 x i8] c"%d%s\00", align 1 | ||
@3 = private unnamed_addr constant [2 x i8] c" \00", align 1 | ||
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 | ||
@5 = private unnamed_addr constant [5 x i8] c"%d%s\00", align 1 | ||
|
||
define void @__module___main_____main__global_init() { | ||
.entry: | ||
br label %return | ||
|
||
return: ; preds = %.entry | ||
ret void | ||
} | ||
|
||
define void @__module___main_____main__global_stmts() { | ||
.entry: | ||
%0 = load i32, i32* getelementptr inbounds (%Bar, %Bar* @bar, i32 0, i32 0, i32 0), align 4 | ||
call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @2, i32 0, i32 0), i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @1, i32 0, i32 0)) | ||
%1 = load i32, i32* getelementptr inbounds (%Bar, %Bar* @bar, i32 0, i32 0, i32 0), align 4 | ||
call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) | ||
br label %return | ||
|
||
return: ; preds = %.entry | ||
ret void | ||
} | ||
|
||
declare void @_lfortran_printf(i8*, ...) | ||
|
||
define i32 @main(i32 %0, i8** %1) { | ||
.entry: | ||
call void @_lpython_set_argv(i32 %0, i8** %1) | ||
call void @__module___main_____main__global_init() | ||
call void @__module___main_____main__global_stmts() | ||
ret i32 0 | ||
} | ||
|
||
declare void @_lpython_set_argv(i32, i8**) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters