[PATCH] D54373: [clang]: Correct naming conventions and 80 col rule violation in CGDeclCXX.cpp. NFC.

Kristina Brooks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 9 23:56:17 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL346582: Correct naming conventions and 80 col rule violation in CGDeclCXX.cpp. NFC. (authored by kristina, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D54373?vs=173493&id=173494#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D54373

Files:
  cfe/trunk/lib/CodeGen/CGDeclCXX.cpp


Index: cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
+++ cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
@@ -68,10 +68,10 @@
 
   // 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 @@
     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 @@
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54373.173494.patch
Type: text/x-patch
Size: 2783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181110/f9d48255/attachment.bin>


More information about the cfe-commits mailing list