mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-27 14:45:24 +00:00
1913eeb385
Summary: * Updated the documentation * Added a test for >2 arguments * Added a check for the lexical concatenation * Made the existing test a bit stricter. Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: t.p.northover, llvm-commits Differential Revision: http://reviews.llvm.org/D3485 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207865 91177308-0d34-0410-b5e6-96231b3b80d8
25 lines
644 B
TableGen
25 lines
644 B
TableGen
// RUN: llvm-tblgen %s | FileCheck %s
|
|
|
|
// CHECK: class Y<string Y:S = ?> {
|
|
// CHECK: string T = !strconcat(Y:S, "foo");
|
|
// CHECK: string T2 = !strconcat(Y:S, !strconcat("foo", !strconcat(Y:S, "bar")));
|
|
// CHECK: string S = "foobar";
|
|
// CHECK: }
|
|
|
|
// CHECK: def Z {
|
|
// CHECK: string T = "fufoo";
|
|
// CHECK: string T2 = "fufoofubar";
|
|
// CHECK: string S = "foobar";
|
|
// CHECK: }
|
|
|
|
class Y<string S> {
|
|
string T = !strconcat(S, "foo");
|
|
// More than two arguments is equivalent to nested calls
|
|
string T2 = !strconcat(S, "foo", S, "bar");
|
|
|
|
// String values concatenate lexically, as in C.
|
|
string S = "foo" "bar";
|
|
}
|
|
|
|
def Z : Y<"fu">;
|