[llvm-commits] [llvm] r130915 - /llvm/trunk/include/llvm/CompilerDriver/Common.td

Mikhail Glushenkov foldr at codedgers.com
Wed May 4 21:25:03 PDT 2011


Author: foldr
Date: Wed May  4 23:25:03 2011
New Revision: 130915

URL: http://llvm.org/viewvc/llvm-project?rev=130915&view=rev
Log:
llvmc: Make 'true' and 'false' instances of a 'Bool' class.

Modified:
    llvm/trunk/include/llvm/CompilerDriver/Common.td

Modified: llvm/trunk/include/llvm/CompilerDriver/Common.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CompilerDriver/Common.td?rev=130915&r1=130914&r2=130915&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CompilerDriver/Common.td (original)
+++ llvm/trunk/include/llvm/CompilerDriver/Common.td Wed May  4 23:25:03 2011
@@ -56,8 +56,11 @@
 def case;
 
 // Boolean constants.
-def true;
-def false;
+class Bool<bit val> {
+      bit Value = val;
+}
+def true : Bool<1>;
+def false : Bool<0>;
 
 // Boolean operators.
 def and;





More information about the llvm-commits mailing list