File: expr-type.fir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (31 lines) | stat: -rw-r--r-- 1,967 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Test the HLFIR Expr type
// Parse types and check that we can reparse what we print.
// RUN: fir-opt --split-input-file %s | fir-opt --split-input-file | FileCheck %s

// Scalar expression types
func.func private @scalar01() -> !hlfir.expr<!fir.char<1,?>>
func.func private @scalar02() -> !hlfir.expr<!fir.char<2,10>>
func.func private @scalar03() -> !hlfir.expr<!fir.type<derived{f:f32}>>
// CHECK-LABEL:  func.func private @scalar01() -> !hlfir.expr<!fir.char<1,?>>
// CHECK-LABEL:  func.func private @scalar02() -> !hlfir.expr<!fir.char<2,10>>
// CHECK-LABEL:  func.func private @scalar03() -> !hlfir.expr<!fir.type<derived{f:f32}>>

// Array expression types
func.func private @array01() -> !hlfir.expr<?x!fir.char<1,?>>
func.func private @array02() -> !hlfir.expr<10x!fir.char<1,20>>
func.func private @array03() -> !hlfir.expr<10x?x20x?x30x?x40x?x50x?x60xf128>
func.func private @array04() -> !hlfir.expr<10x20x!fir.type<derived{f:f32}>>
func.func private @array05() -> !hlfir.expr<10xi32>
// CHECK-LABEL:  func.func private @array01() -> !hlfir.expr<?x!fir.char<1,?>>
// CHECK-LABEL:  func.func private @array02() -> !hlfir.expr<10x!fir.char<1,20>>
// CHECK-LABEL:  func.func private @array03() -> !hlfir.expr<10x?x20x?x30x?x40x?x50x?x60xf128>
// CHECK-LABEL:  func.func private @array04() -> !hlfir.expr<10x20x!fir.type<derived{f:f32}>>
// CHECK-LABEL:  func.func private @array05() -> !hlfir.expr<10xi32>

// Polymorphic expression types
func.func private @polymorph01() -> !hlfir.expr<!fir.type<derived{f:f32}>?>
func.func private @polymorph02() -> !hlfir.expr<?x!fir.type<derived{f:f32}>?>
func.func private @polymorph03() -> !hlfir.expr<10x!fir.type<derived{f:f32}>?>
// CHECK-LABEL:  func.func private @polymorph01() -> !hlfir.expr<!fir.type<derived{f:f32}>?>
// CHECK-LABEL:  func.func private @polymorph02() -> !hlfir.expr<?x!fir.type<derived{f:f32}>?>
// CHECK-LABEL:  func.func private @polymorph03() -> !hlfir.expr<10x!fir.type<derived{f:f32}>?>