diff options
author | Kristina Brooks <kristina@nym.hush.com> | 2018-11-10 07:53:47 +0000 |
---|---|---|
committer | Kristina Brooks <kristina@nym.hush.com> | 2018-11-10 07:53:47 +0000 |
commit | adac0fd5e03c931db669be4c4b13bb9080ba948f (patch) | |
tree | 9d47222ae4992ba6ded2d71c3f3653ac5e03b48b | |
parent | 032312dd0140a7074c9b89d305fe44eb0e44e407 (diff) |
Correct naming conventions and 80 col rule violation in CGDeclCXX.cpp. NFC.
Differential Revision: https://reviews.llvm.org/D54373
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346582 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGDeclCXX.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp index 07fb4c0f63..ac229d033a 100644 --- a/lib/CodeGen/CGDeclCXX.cpp +++ b/lib/CodeGen/CGDeclCXX.cpp @@ -68,10 +68,10 @@ static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D, // FIXME: __attribute__((cleanup)) ? - QualType type = D.getType(); - QualType::DestructionKind dtorKind = type.isDestructedType(); + QualType Type = D.getType(); + QualType::DestructionKind DtorKind = Type.isDestructedType(); - switch (dtorKind) { + switch (DtorKind) { case QualType::DK_none: return; @@ -86,13 +86,14 @@ static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D, return; } - llvm::Constant *function; - llvm::Constant *argument; + llvm::Constant *Func; + llvm::Constant *Argument; // Special-case non-array C++ destructors, if they have the right signature. // Under some ABIs, destructors return this instead of void, and cannot be - // passed directly to __cxa_atexit if the target does not allow this mismatch. - const CXXRecordDecl *Record = type->getAsCXXRecordDecl(); + // passed directly to __cxa_atexit if the target does not allow this + // mismatch. + const CXXRecordDecl *Record = Type->getAsCXXRecordDecl(); bool CanRegisterDestructor = Record && (!CGM.getCXXABI().HasThisReturn( GlobalDecl(Record->getDestructor(), Dtor_Complete)) || @@ -103,21 +104,21 @@ static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D, bool UsingExternalHelper = !CGM.getCodeGenOpts().CXAAtExit; if (Record && (CanRegisterDestructor || UsingExternalHelper)) { assert(!Record->hasTrivialDestructor()); - CXXDestructorDecl *dtor = Record->getDestructor(); + CXXDestructorDecl *Dtor = Record->getDestructor(); - function = CGM.getAddrOfCXXStructor(dtor, StructorType::Complete); - argument = llvm::ConstantExpr::getBitCast( - addr.getPointer(), CGF.getTypes().ConvertType(type)->getPointerTo()); + Func = CGM.getAddrOfCXXStructor(Dtor, StructorType::Complete); + Argument = llvm::ConstantExpr::getBitCast( + Addr.getPointer(), CGF.getTypes().ConvertType(Type)->getPointerTo()); // Otherwise, the standard logic requires a helper function. } else { - function = CodeGenFunction(CGM) - .generateDestroyHelper(addr, type, CGF.getDestroyer(dtorKind), - CGF.needsEHCleanup(dtorKind), &D); - argument = llvm::Constant::getNullValue(CGF.Int8PtrTy); + Func = CodeGenFunction(CGM) + .generateDestroyHelper(Addr, Type, CGF.getDestroyer(DtorKind), + CGF.needsEHCleanup(DtorKind), &D); + Argument = llvm::Constant::getNullValue(CGF.Int8PtrTy); } - CGM.getCXXABI().registerGlobalDtor(CGF, D, function, argument); + CGM.getCXXABI().registerGlobalDtor(CGF, D, Func, Argument); } /// Emit code to cause the variable at the given address to be considered as |