llvmc: Make 'true' and 'false' instances of a 'Bool' class.
authorMikhail Glushenkov <foldr@codedgers.com>
Thu, 5 May 2011 04:25:03 +0000 (04:25 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Thu, 5 May 2011 04:25:03 +0000 (04:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130915 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CompilerDriver/Common.td

index 84e8783d20aa28ef5cffc506559aa4402e431884..6ba30aaa640679eaf1e749e9108525f3bf97fa6c 100644 (file)
@@ -56,8 +56,11 @@ def forward_not_split;
 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;