[llvm-commits] [llvm] r173445 - in /llvm/trunk: docs/TableGen/LangRef.rst include/llvm/TableGen/Record.h lib/TableGen/Record.cpp lib/TableGen/TGLexer.cpp lib/TableGen/TGLexer.h lib/TableGen/TGParser.cpp test/TableGen/math.td
Sean Silva
silvas at purdue.edu
Fri Jan 25 10:06:50 PST 2013
+class Int<int value> {
+ int Value = value;
+}
+
+def v1024 : Int<1024>;
+// CHECK: Value = 1024
+
+def v1025 : Int<!add(v1024.Value, 1)>;
+// CHECK: Value = 1025
+
+def v2048 : Int<!add(v1024.Value, v1024.Value)>;
+// CHECK: Value = 2048
+
You probably want to CHECK the name of the `def` before each of these
in order to make the test a bit more robust.
-- Sean Silva
-- Sean Silva
More information about the llvm-commits
mailing list