diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-12 04:54:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-12 04:54:14 +0000 |
commit | 746e03ed511664a1c781b209faaa3a66d4593480 (patch) | |
tree | b8e2aed7b838aed3e3847ef5967b310bf81746d9 /lib/CodeGen/CGStmt.cpp | |
parent | f0d960a2d303d1b7f8ee3bca2d52eee15f4c853e (diff) |
Clean up some code to use isZero instead of calling getZExtValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59103 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index daad3f5e79..7f9ca7af7f 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -233,7 +233,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { if (llvm::ConstantInt *CondCst = dyn_cast<llvm::ConstantInt>(BoolCondVal)) { // Figure out which block (then or else) is executed. const Stmt *Executed = S.getThen(), *Skipped = S.getElse(); - if (!CondCst->getZExtValue()) + if (CondCst->isZero()) std::swap(Executed, Skipped); // If the skipped block has no labels in it, just emit the executed block. |