From c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 2 Aug 2018 17:33:11 +0000 Subject: Vendor import of clang trunk r338536: https://llvm.org/svn/llvm-project/cfe/trunk@338536 --- lib/CodeGen/CGDeclCXX.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/CodeGen/CGDeclCXX.cpp') diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp index 5e237d7e0b69..510863f68eff 100644 --- a/lib/CodeGen/CGDeclCXX.cpp +++ b/lib/CodeGen/CGDeclCXX.cpp @@ -27,9 +27,9 @@ using namespace CodeGen; static void EmitDeclInit(CodeGenFunction &CGF, const VarDecl &D, ConstantAddress DeclPtr) { assert(D.hasGlobalStorage() && "VarDecl must have global storage!"); - assert(!D.getType()->isReferenceType() && + assert(!D.getType()->isReferenceType() && "Should not call EmitDeclInit on a reference!"); - + QualType type = D.getType(); LValue lv = CGF.MakeAddrLValue(DeclPtr, type); @@ -67,7 +67,7 @@ static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D, CodeGenModule &CGM = CGF.CGM; // FIXME: __attribute__((cleanup)) ? - + QualType type = D.getType(); QualType::DestructionKind dtorKind = type.isDestructedType(); @@ -219,7 +219,7 @@ llvm::Constant *CodeGenFunction::createAtExitStub(const VarDecl &VD, CGF.StartFunction(&VD, CGM.getContext().VoidTy, fn, FI, FunctionArgList()); llvm::CallInst *call = CGF.Builder.CreateCall(dtor, addr); - + // Make sure the call and the callee agree on calling convention. if (llvm::Function *dtorFn = dyn_cast(dtor->stripPointerCasts())) @@ -488,7 +488,7 @@ CodeGenModule::EmitCXXGlobalInitFunc() { // Create our global initialization function. if (!PrioritizedCXXGlobalInits.empty()) { SmallVector LocalCXXGlobalInits; - llvm::array_pod_sort(PrioritizedCXXGlobalInits.begin(), + llvm::array_pod_sort(PrioritizedCXXGlobalInits.begin(), PrioritizedCXXGlobalInits.end()); // Iterate over "chunks" of ctors with same priority and emit each chunk // into separate function. Note - everything is sorted first by priority, @@ -684,8 +684,8 @@ llvm::Function *CodeGenFunction::generateDestroyHelper( StartFunction(VD, getContext().VoidTy, fn, FI, args); emitDestroy(addr, type, destroyer, useEHCleanupForArray); - + FinishFunction(); - + return fn; } -- cgit v1.2.3