Fix some minor whitespace issues.

llvm-svn: 201526
This commit is contained in:
Bob Wilson 2014-02-17 19:20:59 +00:00
parent 6a61922239
commit 95a27b0e60
3 changed files with 3 additions and 4 deletions

View File

@ -1298,7 +1298,7 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
Value *Src = Visit(const_cast<Expr*>(E));
llvm::Type *SrcTy = Src->getType();
llvm::Type *DstTy = ConvertType(DestTy);
if (SrcTy->isPtrOrPtrVectorTy() && DstTy->isPtrOrPtrVectorTy() &&
if (SrcTy->isPtrOrPtrVectorTy() && DstTy->isPtrOrPtrVectorTy() &&
SrcTy->getPointerAddressSpace() != DstTy->getPointerAddressSpace()) {
llvm::Type *MidTy = CGF.CGM.getDataLayout().getIntPtrType(SrcTy);
return Builder.CreateIntToPtr(Builder.CreatePtrToInt(Src, MidTy), DstTy);

View File

@ -394,7 +394,7 @@ static void GenOpenCLArgMetadata(const FunctionDecl *FD, llvm::Function *Fn,
if (ty->isImageType())
AddrSpc =
CGM.getContext().getTargetAddressSpace(LangAS::opencl_global);
addressQuals.push_back(Builder.getInt32(AddrSpc));
// Get argument type name.

View File

@ -480,8 +480,7 @@ llvm::MDNode *CodeGenPGO::createBranchWeights(uint64_t TrueCount,
return MDHelper.createBranchWeights(TrueCount + 1, FalseCount + 1);
}
llvm::MDNode *
CodeGenPGO::createBranchWeights(ArrayRef<uint64_t> Weights) {
llvm::MDNode *CodeGenPGO::createBranchWeights(ArrayRef<uint64_t> Weights) {
llvm::MDBuilder MDHelper(CGM.getLLVMContext());
// TODO: need to scale down to 32-bits, instead of just truncating.
// According to Laplace's Rule of Succession, it is better to compute the