[cfe-commits] r115383 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Chris Lattner
sabre at nondot.org
Fri Oct 1 16:43:16 PDT 2010
Author: lattner
Date: Fri Oct 1 18:43:16 2010
New Revision: 115383
URL: http://llvm.org/viewvc/llvm-project?rev=115383&view=rev
Log:
tidy
Modified:
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=115383&r1=115382&r2=115383&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Fri Oct 1 18:43:16 2010
@@ -43,9 +43,9 @@
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 @@
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()));
}
More information about the cfe-commits
mailing list