Changes in directory llvm/tools/llvm2cpp:

CppWriter.cpp updated: 1.15 -> 1.16
---
Log message:

simplify code


---
Diffs of the changes:  (+1 -2)

 CppWriter.cpp |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


Index: llvm/tools/llvm2cpp/CppWriter.cpp
diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.15 
llvm/tools/llvm2cpp/CppWriter.cpp:1.16
--- llvm/tools/llvm2cpp/CppWriter.cpp:1.15      Thu Sep 14 13:23:27 2006
+++ llvm/tools/llvm2cpp/CppWriter.cpp   Thu Sep 28 18:24:48 2006
@@ -677,8 +677,7 @@
   }
   if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
     Out << "ConstantBool* " << constName << " = ConstantBool::get(" 
-        << (CB == ConstantBool::True ? "true" : "false")
-        << ");";
+        << (CB->getValue() ? "true" : "false") << ");";
   } else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV)) {
     Out << "ConstantSInt* " << constName << " = ConstantSInt::get(" 
         << typeName << ", " << CI->getValue() << ");";



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to