aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-10-01 23:43:16 +0000
committerChris Lattner <sabre@nondot.org>2010-10-01 23:43:16 +0000
commita1aa9e36e6e21f74c56cf9e72cb5bd9aa2a92fd4 (patch)
tree41e38eb51f06bd621a4b29329af686cd3093baae /lib/CodeGen/CGBuiltin.cpp
parent57a4087b349702062cd7c93735106270964be0d5 (diff)
tidy
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--lib/CodeGen/CGBuiltin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 443b7c089f..c87fa90f2e 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/lib/CodeGen/CGBuiltin.cpp
@@ -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()));
}