Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@ -1,17 +0,0 @@
# RUN: Kaleidoscope-Ch3 < %s 2>&1 | FileCheck %s
# Test basic parsing and IR generation.
def foo(x) x + 1;
foo(1);
# CHECK: define double @foo(double %x) {
# CHECK-NEXT: entry:
# CHECK-NEXT: %addtmp = fadd double %x, 1.000000e+00
# CHECK-NEXT: ret double %addtmp
# CHECK-NEXT: }
# CHECK: define double @__anon_expr() {
# CHECK-NEXT: entry:
# CHECK-NEXT: %calltmp = call double @foo(double 1.000000e+00)
# CHECK-NEXT: ret double %calltmp
# CHECK-NEXT: }

View File

@ -1,17 +0,0 @@
# RUN: Kaleidoscope-Ch4 < %s 2>&1 | FileCheck %s
# Test basic definition, binding, and execution.
def foo(x) x + 1;
def bar(x) foo(2 * x);
bar(2);
# CHECK: Evaluated to 5.000000
# Test redefinition.
def foo(x) x + 2;
foo(2);
# CHECK: Evaluated to 4.000000
# Verify that 'bar' still calls the original 'foo'.
bar(2);
# CHECK: Evaluated to 5.000000

View File

@ -1,19 +0,0 @@
# RUN: Kaleidoscope-Ch5 < %s 2>&1 | FileCheck %s
# Test 'if' expression.
def foo(x) if x < 10 then 0 else 1;
foo(9);
foo(11);
# CHECK: Evaluated to 0.000000
# CHECK: Evaluated to 1.000000
# Test 'for' expression.
extern printd(x);
for i = 1, i < 5, 1.0 in
printd(i);
# CHECK: 1.0
# CHECK: 2.0
# CHECK: 3.0
# CHECK: 4.0
# CHECK: 5.0
# CHECK: Evaluated to 0.000000

View File

@ -1,15 +0,0 @@
# RUN: Kaleidoscope-Ch6 < %s 2>&1 | FileCheck %s
# Test unary operator definition.
def unary-(x) 0 - x;
1 + (-1);
# CHECK: Evaluated to 0.000000
# Test binary operator definition.
def binary> 10 (lhs rhs) rhs < lhs;
def foo(x) if x > 10 then 0 else 1;
foo(9);
foo(11);
# CHECK: Evaluated to 1.000000
# CHECK: Evaluated to 0.000000

View File

@ -1,15 +0,0 @@
# RUN: Kaleidoscope-Ch7 < %s 2>&1 | FileCheck %s
# Sequence operator and iterative fibonacci function to test user defined vars.
def binary : 1 (x y) y;
def fibi(x)
var a = 1, b = 1, c in
(for i = 3, i < x in
c = a + b :
a = b :
b = c) :
b;
fibi(10);
# CHECK: Evaluated to 55.000000

View File

@ -1 +0,0 @@
config.unsupported = True