From 7b6f634b076a1325d03af2f4e58fe4cfb8bbb494 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Mon, 17 Feb 2014 19:20:59 +0000 Subject: [PATCH] Fix some minor whitespace issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201526 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 2 +- lib/CodeGen/CodeGenFunction.cpp | 2 +- lib/CodeGen/CodeGenPGO.cpp | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 73c4bae7db..0a49ea5a5e 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1298,7 +1298,7 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Value *Src = Visit(const_cast(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); diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 4b3aa1abf3..715af365c3 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -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. diff --git a/lib/CodeGen/CodeGenPGO.cpp b/lib/CodeGen/CodeGenPGO.cpp index 5475342ecd..f81cbecd5d 100644 --- a/lib/CodeGen/CodeGenPGO.cpp +++ b/lib/CodeGen/CodeGenPGO.cpp @@ -480,8 +480,7 @@ llvm::MDNode *CodeGenPGO::createBranchWeights(uint64_t TrueCount, return MDHelper.createBranchWeights(TrueCount + 1, FalseCount + 1); } -llvm::MDNode * -CodeGenPGO::createBranchWeights(ArrayRef Weights) { +llvm::MDNode *CodeGenPGO::createBranchWeights(ArrayRef 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 -- 2.40.0