]> granicus.if.org Git - clang/commitdiff
tidy
authorChris Lattner <sabre@nondot.org>
Fri, 1 Oct 2010 23:43:16 +0000 (23:43 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 1 Oct 2010 23:43:16 +0000 (23:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115383 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp

index 443b7c089f56f85dca282fcb1915594bb2321dfb..c87fa90f2efcf9468c9930341bb663c5f5980900 100644 (file)
@@ -43,9 +43,9 @@ static void EmitMemoryBarrier(CodeGenFunction &CGF,
 
 static Value *EmitCastToInt(CodeGenFunction &CGF,
                             const llvm::Type *ToType, Value *Val) {
-  if (Val->getType()->isPointerTy()) {
+  if (Val->getType()->isPointerTy())
     return CGF.Builder.CreatePtrToInt(Val, ToType);
-  }
+
   assert(Val->getType()->isIntegerTy() &&
          "Used a non-integer and non-pointer type with atomic builtin");
   assert(Val->getType()->getScalarSizeInBits() <=
@@ -160,7 +160,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
     if (Result.Val.isInt())
       return RValue::get(llvm::ConstantInt::get(VMContext,
                                                 Result.Val.getInt()));
-    else if (Result.Val.isFloat())
+    if (Result.Val.isFloat())
       return RValue::get(ConstantFP::get(VMContext, Result.Val.getFloat()));
   }