[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

Hal Finkel hfinkel at anl.gov
Fri Jan 25 12:30:22 PST 2013


----- Original Message -----
> From: "Sean Silva" <silvas at purdue.edu>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Friday, January 25, 2013 12:06:50 PM
> Subject: Re: [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
> 
> +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.

Good suggestion. r173481. Thanks!

 -Hal

> 
> -- Sean Silva
> 
> -- Sean Silva
> 



More information about the llvm-commits mailing list