mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
b6347771b1
out of r246201). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246203 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
334 B
Plaintext
16 lines
334 B
Plaintext
# 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
|
|
|