Reduce indentation.

llvm-svn: 106980
This commit is contained in:
Anders Carlsson 2010-06-27 15:24:55 +00:00
parent 25a843fcd2
commit ca68d357d4
1 changed files with 11 additions and 14 deletions

View File

@ -325,26 +325,23 @@ CodeGenFunction::EmitReferenceBindingToExpr(const Expr* E,
}
}
const llvm::Type *ResultPtrTy
= llvm::PointerType::get(ConvertType(ResultTy), 0);
const llvm::Type *ResultPtrTy = ConvertType(ResultTy)->getPointerTo();
Object = Builder.CreateBitCast(Object, ResultPtrTy, "temp");
return RValue::get(Object);
}
}
if (Val.isAggregate()) {
Val = RValue::get(Val.getAggregateAddr());
} else {
// Create a temporary variable that we can bind the reference to.
llvm::Value *Temp = CreateMemTemp(E->getType(), "reftmp");
if (Val.isScalar())
EmitStoreOfScalar(Val.getScalarVal(), Temp, false, E->getType());
else
StoreComplexToAddr(Val.getComplexVal(), Temp, false);
Val = RValue::get(Temp);
}
if (Val.isAggregate())
return RValue::get(Val.getAggregateAddr());
// Create a temporary variable that we can bind the reference to.
llvm::Value *Temp = CreateMemTemp(E->getType(), "reftmp");
if (Val.isScalar())
EmitStoreOfScalar(Val.getScalarVal(), Temp, false, E->getType());
else
StoreComplexToAddr(Val.getComplexVal(), Temp, false);
return Val;
return RValue::get(Temp);
}