brintos

brintos / llvm-project-archived public Read only

0
0
Text · 644 B · f5d7512 Raw
25 lines · plain
1// RUN: llvm-tblgen %s | FileCheck %s2 3// CHECK: class Y<string Y:S = ?> {4// CHECK:   string T = !strconcat(Y:S, "foo");5// CHECK:   string T2 = !strconcat(Y:S, !strconcat("foo", !strconcat(Y:S, "bar")));6// CHECK:   string S = "foobar";7// CHECK: }8 9// CHECK: def Z {10// CHECK:   string T = "fufoo";11// CHECK:   string T2 = "fufoofubar";12// CHECK:   string S = "foobar";13// CHECK: }14 15class Y<string S> {16  string T = !strconcat(S, "foo");17  // More than two arguments is equivalent to nested calls18  string T2 = !strconcat(S, "foo", S, "bar");19 20  // String values concatenate lexically, as in C.21  string S = "foo" "bar";22}23 24def Z : Y<"fu">;25