Files
clang-p2996/llvm/test/TableGen/code.td
Nicolai Haehnle 8fb962c04e TableGen: Allow implicit casting between string and code
Summary:
Perhaps the distinction between the two should be removed entirely
in the long term, and the [{ ... }] syntax should just be a convenient
way of writing multi-line strings.

In the meantime, a lot of existing .td files are quite relaxed about
string vs. code, and this change allows switching on more consistent
type checks without breaking those.

Change-Id: If85e3e04469e41b58e2703b62ac0032d2711713c

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D43557

llvm-svn: 325799
2018-02-22 15:27:03 +00:00

24 lines
406 B
TableGen

// RUN: llvm-tblgen %s | FileCheck %s
// XFAIL: vg_leak
// CHECK: --- Defs ---
// TODO: Both of these should result in CodeInits, i.e. print [{...}].
// CHECK: def A0 {
// CHECK: code Code = "Simple";
// CHECK: }
// CHECK: def B0 {
// CHECK: code Code = "With paste 7";
// CHECK: }
class A<code c> {
code Code = c;
}
def A0 : A<"Simple">;
class B<int i> : A<"With paste " # i>;
def B0 : B<7>;