vleschuk retitled this revision from "DebugInfo: use llvm::di_flags_t for debug 
info flags" to "DebugInfo: use llvm::DIFlagsUnderlying type for debug info 
flags".
vleschuk updated the summary for this revision.
vleschuk updated this revision to Diff 69332.
vleschuk added a comment.

Chnaged typedef name according to naming convention.


https://reviews.llvm.org/D23767

Files:
  lib/CodeGen/CGDebugInfo.cpp
  lib/CodeGen/CGDebugInfo.h

Index: lib/CodeGen/CGDebugInfo.h
===================================================================
--- lib/CodeGen/CGDebugInfo.h
+++ lib/CodeGen/CGDebugInfo.h
@@ -517,7 +517,7 @@
                                 StringRef &Name, StringRef &LinkageName,
                                 llvm::DIScope *&FDContext,
                                 llvm::DINodeArray &TParamsArray,
-                                unsigned &Flags);
+                                llvm::DIFlagsUnderlying &Flags);
 
   /// Collect various properties of a VarDecl.
   void collectVarDeclProps(const VarDecl *VD, llvm::DIFile *&Unit,
Index: lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- lib/CodeGen/CGDebugInfo.cpp
+++ lib/CodeGen/CGDebugInfo.cpp
@@ -787,7 +787,7 @@
   Elements = DBuilder.getOrCreateArray(EltTys);
   EltTys.clear();
 
-  unsigned Flags = llvm::DINode::FlagAppleBlock;
+  llvm::DIFlagsUnderlying Flags = llvm::DINode::FlagAppleBlock;
   unsigned LineNo = 0;
 
   auto *EltTy =
@@ -924,7 +924,7 @@
 /// Convert an AccessSpecifier into the corresponding DINode flag.
 /// As an optimization, return 0 if the access specifier equals the
 /// default for the containing type.
-static unsigned getAccessFlag(AccessSpecifier Access, const RecordDecl *RD) {
+static llvm::DIFlagsUnderlying getAccessFlag(AccessSpecifier Access, const RecordDecl *RD) {
   AccessSpecifier Default = clang::AS_none;
   if (RD && RD->isClass())
     Default = clang::AS_private;
@@ -968,7 +968,7 @@
   uint64_t StorageOffsetInBits =
       CGM.getContext().toBits(BitFieldInfo.StorageOffset);
   uint64_t OffsetInBits = StorageOffsetInBits + BitFieldInfo.Offset;
-  unsigned Flags = getAccessFlag(BitFieldDecl->getAccess(), RD);
+  llvm::DIFlagsUnderlying Flags = getAccessFlag(BitFieldDecl->getAccess(), RD);
   return DBuilder.createBitFieldMemberType(
       RecordTy, Name, File, Line, SizeInBits, AlignInBits, OffsetInBits,
       StorageOffsetInBits, Flags, DebugType);
@@ -993,7 +993,7 @@
     AlignInBits = TI.Align;
   }
 
-  unsigned flags = getAccessFlag(AS, RD);
+  llvm::DIFlagsUnderlying flags = getAccessFlag(AS, RD);
   return DBuilder.createMemberType(scope, name, file, line, SizeInBits,
                                    AlignInBits, offsetInBits, flags, debugType);
 }
@@ -1060,7 +1060,7 @@
     }
   }
 
-  unsigned Flags = getAccessFlag(Var->getAccess(), RD);
+  llvm::DIFlagsUnderlying Flags = getAccessFlag(Var->getAccess(), RD);
   llvm::DIDerivedType *GV = DBuilder.createStaticMemberType(
       RecordTy, VName, VUnit, LineNumber, VTy, Flags, C);
   StaticDataMemberCache[Var->getCanonicalDecl()].reset(GV);
@@ -1203,7 +1203,7 @@
 
   llvm::DITypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(Elts);
 
-  unsigned Flags = 0;
+  llvm::DIFlagsUnderlying Flags = 0;
   if (Func->getExtProtoInfo().RefQualifier == RQ_LValue)
     Flags |= llvm::DINode::FlagLValueReference;
   if (Func->getExtProtoInfo().RefQualifier == RQ_RValue)
@@ -1254,7 +1254,7 @@
   llvm::DIType *ContainingType = nullptr;
   unsigned Virtuality = 0;
   unsigned VIndex = 0;
-  unsigned Flags = 0;
+  llvm::DIFlagsUnderlying Flags = 0;
   int ThisAdjustment = 0;
 
   if (Method->isVirtual()) {
@@ -1367,7 +1367,7 @@
                                   llvm::DIType *RecordTy) {
   const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);
   for (const auto &BI : RD->bases()) {
-    unsigned BFlags = 0;
+    llvm::DIFlagsUnderlying BFlags = 0;
     uint64_t BaseOffset;
 
     const auto *Base =
@@ -1918,7 +1918,7 @@
   uint64_t Size = CGM.getContext().getTypeSize(Ty);
   uint64_t Align = CGM.getContext().getTypeAlign(Ty);
 
-  unsigned Flags = 0;
+  llvm::DIFlagsUnderlying Flags = 0;
   if (ID->getImplementation())
     Flags |= llvm::DINode::FlagObjcClassComplete;
 
@@ -2026,7 +2026,7 @@
       FieldOffset = RL.getFieldOffset(FieldNo);
     }
 
-    unsigned Flags = 0;
+    llvm::DIFlagsUnderlying Flags = 0;
     if (Field->getAccessControl() == ObjCIvarDecl::Protected)
       Flags = llvm::DINode::FlagProtected;
     else if (Field->getAccessControl() == ObjCIvarDecl::Private)
@@ -2157,7 +2157,7 @@
 
 llvm::DIType *CGDebugInfo::CreateType(const MemberPointerType *Ty,
                                       llvm::DIFile *U) {
-  unsigned Flags = 0;
+  llvm::DIFlagsUnderlying Flags = 0;
   uint64_t Size = 0;
 
   if (!Ty->isIncompleteType()) {
@@ -2633,7 +2633,7 @@
                                            StringRef &LinkageName,
                                            llvm::DIScope *&FDContext,
                                            llvm::DINodeArray &TParamsArray,
-                                           unsigned &Flags) {
+                                           llvm::DIFlagsUnderlying &Flags) {
   const auto *FD = cast<FunctionDecl>(GD.getDecl());
   Name = getFunctionName(FD);
   // Use mangled name as linkage name for C/C++ functions.
@@ -2717,7 +2717,7 @@
 CGDebugInfo::getFunctionForwardDeclaration(const FunctionDecl *FD) {
   llvm::DINodeArray TParamsArray;
   StringRef Name, LinkageName;
-  unsigned Flags = 0;
+  llvm::DIFlagsUnderlying Flags = 0;
   SourceLocation Loc = FD->getLocation();
   llvm::DIFile *Unit = getOrCreateFile(Loc);
   llvm::DIScope *DContext = Unit;
@@ -2903,7 +2903,7 @@
   const Decl *D = GD.getDecl();
   bool HasDecl = (D != nullptr);
 
-  unsigned Flags = 0;
+  llvm::DIFlagsUnderlying Flags = 0;
   llvm::DIFile *Unit = getOrCreateFile(Loc);
   llvm::DIScope *FDContext = Unit;
   llvm::DINodeArray TParamsArray;
@@ -2976,7 +2976,7 @@
   if (!D)
     return;
 
-  unsigned Flags = 0;
+  llvm::DIFlagsUnderlying Flags = 0;
   llvm::DIFile *Unit = getOrCreateFile(Loc);
   llvm::DIScope *FDContext = getDeclContextDescriptor(D);
   llvm::DINodeArray TParamsArray;
@@ -3139,7 +3139,7 @@
 
   llvm::DINodeArray Elements = DBuilder.getOrCreateArray(EltTys);
 
-  unsigned Flags = llvm::DINode::FlagBlockByrefStruct;
+  llvm::DIFlagsUnderlying Flags = llvm::DINode::FlagBlockByrefStruct;
 
   return DBuilder.createStructType(Unit, "", Unit, 0, FieldOffset, 0, Flags,
                                    nullptr, Elements);
@@ -3179,7 +3179,7 @@
     Column = getColumnNumber(VD->getLocation());
   }
   SmallVector<int64_t, 9> Expr;
-  unsigned Flags = 0;
+  llvm::DIFlagsUnderlying Flags = 0;
   if (VD->isImplicit())
     Flags |= llvm::DINode::FlagArtificial;
   // If this is the first argument and it is implicit then
@@ -3503,7 +3503,7 @@
   type = DBuilder.createPointerType(type, CGM.PointerWidthInBits);
 
   // Get overall information about the block.
-  unsigned flags = llvm::DINode::FlagArtificial;
+  llvm::DIFlagsUnderlying flags = llvm::DINode::FlagArtificial;
   auto *scope = cast<llvm::DILocalScope>(LexicalBlockStack.back());
 
   // Create the descriptor for the parameter.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to