diff --git a/.gitignore b/.gitignore index 95c0c2f3a03..eec6d73ecaf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .idea/shelf dependencies dist +linked out tmp workspace.xml diff --git a/translator/src/test/kotlin/tests/linked/main.ll b/translator/src/test/kotlin/tests/linked/main.ll deleted file mode 100644 index c76c889a7f1..00000000000 --- a/translator/src/test/kotlin/tests/linked/main.ll +++ /dev/null @@ -1,50 +0,0 @@ -; ModuleID = 'src/test/kotlin/tests/linked/main.c' -source_filename = "src/test/kotlin/tests/linked/main.c" -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -@.str = private unnamed_addr constant [26 x i8] c"return_test_1(101) == 101\00", align 1 -@.str.1 = private unnamed_addr constant [36 x i8] c"src/test/kotlin/tests/linked/main.c\00", align 1 -@__PRETTY_FUNCTION__.main = private unnamed_addr constant [11 x i8] c"int main()\00", align 1 -@.str.2 = private unnamed_addr constant [32 x i8] c"OK: return_test_1(101) == 101 \0A\00", align 1 -@.str.3 = private unnamed_addr constant [17 x i8] c"TEST RESULT: OK\0A\00", align 1 - -; Function Attrs: nounwind uwtable -define i32 @main() #0 { -entry: - %retval = alloca i32, align 4 - store i32 0, i32* %retval, align 4 - %call = call i32 (i32, ...) bitcast (i32 (...)* @return_test_1 to i32 (i32, ...)*)(i32 101) - %cmp = icmp eq i32 %call, 101 - br i1 %cmp, label %cond.true, label %cond.false - -cond.true: ; preds = %entry - br label %cond.end - -cond.false: ; preds = %entry - call void @__assert_fail(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i32 0, i32 0), i32 9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__PRETTY_FUNCTION__.main, i32 0, i32 0)) #3 - unreachable - ; No predecessors! - br label %cond.end - -cond.end: ; preds = %0, %cond.true - %call1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i32 0, i32 0)) - %call2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i32 0, i32 0)) - ret i32 0 -} - -declare i32 @return_test_1(...) #1 - -; Function Attrs: noreturn nounwind -declare void @__assert_fail(i8*, i8*, i32, i8*) #2 - -declare i32 @printf(i8*, ...) #1 - -attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } -attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } -attributes #2 = { noreturn nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } -attributes #3 = { noreturn nounwind } - -!llvm.ident = !{!0} - -!0 = !{!"clang version 3.9.0 (trunk 274621) (llvm/trunk 274620)"} diff --git a/translator/src/test/kotlin/tests/linked/return_1.ll b/translator/src/test/kotlin/tests/linked/return_1.ll deleted file mode 100644 index f12dd71d30e..00000000000 --- a/translator/src/test/kotlin/tests/linked/return_1.ll +++ /dev/null @@ -1,8 +0,0 @@ -declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) -define i32 @return_test_1(i32 %x) -{ -%x.addr = alloca i32, align 4 -store i32 %x, i32* %x.addr, align 4 -ret i32 101 -} - diff --git a/translator/src/test/kotlin/tests/linked/run.ll b/translator/src/test/kotlin/tests/linked/run.ll deleted file mode 100644 index 96a7efaf4af..00000000000 Binary files a/translator/src/test/kotlin/tests/linked/run.ll and /dev/null differ