]> granicus.if.org Git - clang/commitdiff
DebugInfo: Metadata constructs now start with DI*
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 29 Apr 2015 16:40:08 +0000 (16:40 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 29 Apr 2015 16:40:08 +0000 (16:40 +0000)
LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now
that the `DIDescriptor` hierarchy has been gone for about a week.  This
commit was generated using the rename-md-di-nodes.sh upgrade script
attached to PR23080, followed by running clang-format-diff.py on the
`lib/` portion of the patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236121 91177308-0d34-0410-b5e6-96231b3b80d8

142 files changed:
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
test/CodeGen/2009-10-20-GlobalDebug.c
test/CodeGen/2010-02-15-DbgStaticVar.c
test/CodeGen/2010-02-16-DbgScopes.c
test/CodeGen/2010-03-09-DbgInfo.c
test/CodeGen/2010-03-5-LexicalScope.c
test/CodeGen/2010-07-08-DeclDebugLineNo.c
test/CodeGen/2010-08-10-DbgConstant.c
test/CodeGen/debug-info-257-args.c
test/CodeGen/debug-info-args.c
test/CodeGen/debug-info-block-decl.c
test/CodeGen/debug-info-block-out-return.c
test/CodeGen/debug-info-block.c
test/CodeGen/debug-info-enum.c
test/CodeGen/debug-info-file-change.c
test/CodeGen/debug-info-gline-tables-only2.c
test/CodeGen/debug-info-limited.c
test/CodeGen/debug-info-line.c
test/CodeGen/debug-info-line3.c
test/CodeGen/debug-info-line4.c
test/CodeGen/debug-info-same-line.c
test/CodeGen/debug-info-scope-file.c
test/CodeGen/debug-info-scope.c
test/CodeGen/debug-info-static.c
test/CodeGen/debug-info-typedef.c
test/CodeGen/debug-info-vector.c
test/CodeGen/debug-info-vla.c
test/CodeGen/debug-info.c
test/CodeGen/lifetime-debuginfo-1.c
test/CodeGen/lifetime-debuginfo-2.c
test/CodeGen/lineno-dbginfo.c
test/CodeGen/linetable-endscope.c
test/CodeGenCXX/2010-07-23-DeclLoc.cpp
test/CodeGenCXX/Inputs/debug-info-class-limited.cpp
test/CodeGenCXX/PR20038.cpp
test/CodeGenCXX/coverage.cpp
test/CodeGenCXX/debug-info-access.cpp
test/CodeGenCXX/debug-info-alias.cpp
test/CodeGenCXX/debug-info-anon-union-vars.cpp
test/CodeGenCXX/debug-info-artificial-arg.cpp
test/CodeGenCXX/debug-info-blocks.cpp
test/CodeGenCXX/debug-info-char16.cpp
test/CodeGenCXX/debug-info-class-nolimit.cpp
test/CodeGenCXX/debug-info-class.cpp
test/CodeGenCXX/debug-info-cxx1y.cpp
test/CodeGenCXX/debug-info-decl-nested.cpp
test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
test/CodeGenCXX/debug-info-enum-class.cpp
test/CodeGenCXX/debug-info-enum.cpp
test/CodeGenCXX/debug-info-flex-member.cpp
test/CodeGenCXX/debug-info-fn-template.cpp
test/CodeGenCXX/debug-info-function-context.cpp
test/CodeGenCXX/debug-info-fwd-ref.cpp
test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
test/CodeGenCXX/debug-info-global.cpp
test/CodeGenCXX/debug-info-globalinit.cpp
test/CodeGenCXX/debug-info-indirect-field-decl.cpp
test/CodeGenCXX/debug-info-limited.cpp
test/CodeGenCXX/debug-info-line-if.cpp
test/CodeGenCXX/debug-info-line.cpp
test/CodeGenCXX/debug-info-method.cpp
test/CodeGenCXX/debug-info-namespace.cpp
test/CodeGenCXX/debug-info-nullptr.cpp
test/CodeGenCXX/debug-info-ptr-to-member-function.cpp
test/CodeGenCXX/debug-info-qualifiers.cpp
test/CodeGenCXX/debug-info-rvalue-ref.cpp
test/CodeGenCXX/debug-info-scope.cpp
test/CodeGenCXX/debug-info-static-fns.cpp
test/CodeGenCXX/debug-info-static-member.cpp
test/CodeGenCXX/debug-info-template-explicit-specialization.cpp
test/CodeGenCXX/debug-info-template-fwd.cpp
test/CodeGenCXX/debug-info-template-limit.cpp
test/CodeGenCXX/debug-info-template-member.cpp
test/CodeGenCXX/debug-info-template-partial-specialization.cpp
test/CodeGenCXX/debug-info-template-quals.cpp
test/CodeGenCXX/debug-info-template.cpp
test/CodeGenCXX/debug-info-thunk.cpp
test/CodeGenCXX/debug-info-union-template.cpp
test/CodeGenCXX/debug-info-union.cpp
test/CodeGenCXX/debug-info-uuid.cpp
test/CodeGenCXX/debug-info-varargs.cpp
test/CodeGenCXX/debug-info-vtable-optzn.cpp
test/CodeGenCXX/debug-info-wchar.cpp
test/CodeGenCXX/debug-info-windows-dtor.cpp
test/CodeGenCXX/debug-info-zero-length-arrays.cpp
test/CodeGenCXX/debug-info.cpp
test/CodeGenCXX/debug-lambda-expressions.cpp
test/CodeGenCXX/debug-lambda-this.cpp
test/CodeGenCXX/destructor-debug-info.cpp
test/CodeGenCXX/field-access-debug-info.cpp
test/CodeGenCXX/globalinit-loc.cpp
test/CodeGenCXX/inline-dllexport-member.cpp
test/CodeGenCXX/linetable-cleanup.cpp
test/CodeGenCXX/linetable-eh.cpp
test/CodeGenCXX/linetable-fnbegin.cpp
test/CodeGenCXX/linetable-virtual-variadic.cpp
test/CodeGenCXX/lpad-linetable.cpp
test/CodeGenCXX/scoped-enums-debug-info.cpp
test/CodeGenCXX/vtable-holder-self-reference.cpp
test/CodeGenObjC/2010-02-09-DbgSelf.m
test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m
test/CodeGenObjC/arc-linetable-autorelease.m
test/CodeGenObjC/arc-linetable.m
test/CodeGenObjC/block-byref-debuginfo.m
test/CodeGenObjC/catch-lexical-block.m
test/CodeGenObjC/debug-info-block-captured-self.m
test/CodeGenObjC/debug-info-block-helper.m
test/CodeGenObjC/debug-info-block-type.m
test/CodeGenObjC/debug-info-blocks.m
test/CodeGenObjC/debug-info-fwddecl.m
test/CodeGenObjC/debug-info-getter-name.m
test/CodeGenObjC/debug-info-id-with-protocol.m
test/CodeGenObjC/debug-info-impl.m
test/CodeGenObjC/debug-info-instancetype.m
test/CodeGenObjC/debug-info-ivars-extension.m
test/CodeGenObjC/debug-info-ivars-indirect.m
test/CodeGenObjC/debug-info-ivars-private.m
test/CodeGenObjC/debug-info-ivars.m
test/CodeGenObjC/debug-info-lifetime-crash.m
test/CodeGenObjC/debug-info-property-accessors.m
test/CodeGenObjC/debug-info-property3.m
test/CodeGenObjC/debug-info-pubtypes.m
test/CodeGenObjC/debug-info-self.m
test/CodeGenObjC/debug-info-static-var.m
test/CodeGenObjC/debug-info-synthesis.m
test/CodeGenObjC/debug-info-variadic-method.m
test/CodeGenObjC/debug-property-synth.m
test/CodeGenObjC/debuginfo-properties.m
test/CodeGenObjC/objc-fixed-enum.m
test/CodeGenObjCXX/debug-info-cyclic.mm
test/CodeGenObjCXX/debug-info-line.mm
test/Driver/darwin-debug-flags.c
test/OpenMP/atomic_codegen.cpp
test/OpenMP/critical_codegen.cpp
test/OpenMP/for_codegen.cpp
test/OpenMP/master_codegen.cpp
test/OpenMP/parallel_for_codegen.cpp
test/OpenMP/simd_codegen.cpp
test/OpenMP/single_codegen.cpp
test/PCH/debug-info-limited-struct.c
test/VFS/external-names.c

index fd45f620dcd44951a81b143851138dbe3b968500..cbb4f85c843c037636f6b721263868e314619d00 100644 (file)
@@ -120,18 +120,18 @@ void CGDebugInfo::setLocation(SourceLocation Loc) {
     return;
 
   SourceManager &SM = CGM.getContext().getSourceManager();
-  auto *Scope = cast<llvm::MDScope>(LexicalBlockStack.back());
+  auto *Scope = cast<llvm::DIScope>(LexicalBlockStack.back());
   PresumedLoc PCLoc = SM.getPresumedLoc(CurLoc);
 
   if (PCLoc.isInvalid() || Scope->getFilename() == PCLoc.getFilename())
     return;
 
-  if (auto *LBF = dyn_cast<llvm::MDLexicalBlockFile>(Scope)) {
+  if (auto *LBF = dyn_cast<llvm::DILexicalBlockFile>(Scope)) {
     LexicalBlockStack.pop_back();
     LexicalBlockStack.emplace_back(DBuilder.createLexicalBlockFile(
         LBF->getScope(), getOrCreateFile(CurLoc)));
-  } else if (isa<llvm::MDLexicalBlock>(Scope) ||
-             isa<llvm::MDSubprogram>(Scope)) {
+  } else if (isa<llvm::DILexicalBlock>(Scope) ||
+             isa<llvm::DISubprogram>(Scope)) {
     LexicalBlockStack.pop_back();
     LexicalBlockStack.emplace_back(
         DBuilder.createLexicalBlockFile(Scope, getOrCreateFile(CurLoc)));
@@ -139,14 +139,14 @@ void CGDebugInfo::setLocation(SourceLocation Loc) {
 }
 
 /// getContextDescriptor - Get context info for the decl.
-llvm::MDScope *CGDebugInfo::getContextDescriptor(const Decl *Context) {
+llvm::DIScope *CGDebugInfo::getContextDescriptor(const Decl *Context) {
   if (!Context)
     return TheCU;
 
   auto I = RegionMap.find(Context);
   if (I != RegionMap.end()) {
     llvm::Metadata *V = I->second;
-    return dyn_cast_or_null<llvm::MDScope>(V);
+    return dyn_cast_or_null<llvm::DIScope>(V);
   }
 
   // Check namespace.
@@ -243,7 +243,7 @@ StringRef CGDebugInfo::getClassName(const RecordDecl *RD) {
 }
 
 /// getOrCreateFile - Get the file debug info descriptor for the input location.
-llvm::MDFile *CGDebugInfo::getOrCreateFile(SourceLocation Loc) {
+llvm::DIFile *CGDebugInfo::getOrCreateFile(SourceLocation Loc) {
   if (!Loc.isValid())
     // If Location is not valid then use main input file.
     return DBuilder.createFile(TheCU->getFilename(), TheCU->getDirectory());
@@ -262,10 +262,10 @@ llvm::MDFile *CGDebugInfo::getOrCreateFile(SourceLocation Loc) {
   if (it != DIFileCache.end()) {
     // Verify that the information still exists.
     if (llvm::Metadata *V = it->second)
-      return cast<llvm::MDFile>(V);
+      return cast<llvm::DIFile>(V);
   }
 
-  llvm::MDFile *F =
+  llvm::DIFile *F =
       DBuilder.createFile(PLoc.getFilename(), getCurrentDirname());
 
   DIFileCache[fname].reset(F);
@@ -273,7 +273,7 @@ llvm::MDFile *CGDebugInfo::getOrCreateFile(SourceLocation Loc) {
 }
 
 /// getOrCreateMainFile - Get the file info for main compile unit.
-llvm::MDFile *CGDebugInfo::getOrCreateMainFile() {
+llvm::DIFile *CGDebugInfo::getOrCreateMainFile() {
   return DBuilder.createFile(TheCU->getFilename(), TheCU->getDirectory());
 }
 
@@ -384,7 +384,7 @@ void CGDebugInfo::CreateCompileUnit() {
 
 /// CreateType - Get the Basic type from the cache or create a new
 /// one if necessary.
-llvm::MDType *CGDebugInfo::CreateType(const BuiltinType *BT) {
+llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
   llvm::dwarf::TypeKind Encoding;
   StringRef BTName;
   switch (BT->getKind()) {
@@ -423,7 +423,7 @@ llvm::MDType *CGDebugInfo::CreateType(const BuiltinType *BT) {
 
     ObjTy =
         DBuilder.createStructType(TheCU, "objc_object", getOrCreateMainFile(),
-                                  0, 0, 0, 0, nullptr, llvm::DebugNodeArray());
+                                  0, 0, 0, 0, nullptr, llvm::DINodeArray());
 
     DBuilder.replaceArrays(
         ObjTy,
@@ -523,7 +523,7 @@ llvm::MDType *CGDebugInfo::CreateType(const BuiltinType *BT) {
   return DBuilder.createBasicType(BTName, Size, Align, Encoding);
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const ComplexType *Ty) {
+llvm::DIType *CGDebugInfo::CreateType(const ComplexType *Ty) {
   // Bit size, align and offset of the type.
   llvm::dwarf::TypeKind Encoding = llvm::dwarf::DW_ATE_complex_float;
   if (Ty->isComplexIntegerType())
@@ -536,8 +536,8 @@ llvm::MDType *CGDebugInfo::CreateType(const ComplexType *Ty) {
 
 /// CreateCVRType - Get the qualified type from the cache or create
 /// a new one if necessary.
-llvm::MDType *CGDebugInfo::CreateQualifiedType(QualType Ty,
-                                               llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateQualifiedType(QualType Ty,
+                                               llvm::DIFile *Unit) {
   QualifierCollector Qc;
   const Type *T = Qc.strip(Ty);
 
@@ -570,8 +570,8 @@ llvm::MDType *CGDebugInfo::CreateQualifiedType(QualType Ty,
   return DBuilder.createQualifiedType(Tag, FromTy);
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const ObjCObjectPointerType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const ObjCObjectPointerType *Ty,
+                                      llvm::DIFile *Unit) {
 
   // The frontend treats 'id' as a typedef to an ObjCObjectType,
   // whereas 'id<protocol>' is treated as an ObjCPointerType. For the
@@ -583,8 +583,8 @@ llvm::MDType *CGDebugInfo::CreateType(const ObjCObjectPointerType *Ty,
                                Ty->getPointeeType(), Unit);
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const PointerType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const PointerType *Ty,
+                                      llvm::DIFile *Unit) {
   return CreatePointerLikeType(llvm::dwarf::DW_TAG_pointer_type, Ty,
                                Ty->getPointeeType(), Unit);
 }
@@ -593,7 +593,7 @@ llvm::MDType *CGDebugInfo::CreateType(const PointerType *Ty,
 /// on their mangled names, if they're external.
 static SmallString<256> getUniqueTagTypeName(const TagType *Ty,
                                              CodeGenModule &CGM,
-                                             llvm::MDCompileUnit *TheCU) {
+                                             llvm::DICompileUnit *TheCU) {
   SmallString<256> FullName;
   // FIXME: ODR should apply to ObjC++ exactly the same wasy it does to C++.
   // For now, only apply ODR with C++.
@@ -629,13 +629,13 @@ static llvm::dwarf::Tag getTagForRecord(const RecordDecl *RD) {
 }
 
 // Creates a forward declaration for a RecordDecl in the given context.
-llvm::MDCompositeType *
+llvm::DICompositeType *
 CGDebugInfo::getOrCreateRecordFwdDecl(const RecordType *Ty,
-                                      llvm::MDScope *Ctx) {
+                                      llvm::DIScope *Ctx) {
   const RecordDecl *RD = Ty->getDecl();
-  if (llvm::MDType *T = getTypeOrNull(CGM.getContext().getRecordType(RD)))
-    return cast<llvm::MDCompositeType>(T);
-  llvm::MDFile *DefUnit = getOrCreateFile(RD->getLocation());
+  if (llvm::DIType *T = getTypeOrNull(CGM.getContext().getRecordType(RD)))
+    return cast<llvm::DICompositeType>(T);
+  llvm::DIFile *DefUnit = getOrCreateFile(RD->getLocation());
   unsigned Line = getLineNumber(RD->getLocation());
   StringRef RDName = getClassName(RD);
 
@@ -650,19 +650,19 @@ CGDebugInfo::getOrCreateRecordFwdDecl(const RecordType *Ty,
 
   // Create the type.
   SmallString<256> FullName = getUniqueTagTypeName(Ty, CGM, TheCU);
-  llvm::MDCompositeType *RetTy = DBuilder.createReplaceableCompositeType(
+  llvm::DICompositeType *RetTy = DBuilder.createReplaceableCompositeType(
       getTagForRecord(RD), RDName, Ctx, DefUnit, Line, 0, Size, Align,
-      llvm::DebugNode::FlagFwdDecl, FullName);
+      llvm::DINode::FlagFwdDecl, FullName);
   ReplaceMap.emplace_back(
       std::piecewise_construct, std::make_tuple(Ty),
       std::make_tuple(static_cast<llvm::Metadata *>(RetTy)));
   return RetTy;
 }
 
-llvm::MDType *CGDebugInfo::CreatePointerLikeType(llvm::dwarf::Tag Tag,
+llvm::DIType *CGDebugInfo::CreatePointerLikeType(llvm::dwarf::Tag Tag,
                                                  const Type *Ty,
                                                  QualType PointeeTy,
-                                                 llvm::MDFile *Unit) {
+                                                 llvm::DIFile *Unit) {
   if (Tag == llvm::dwarf::DW_TAG_reference_type ||
       Tag == llvm::dwarf::DW_TAG_rvalue_reference_type)
     return DBuilder.createReferenceType(Tag, getOrCreateType(PointeeTy, Unit));
@@ -678,8 +678,8 @@ llvm::MDType *CGDebugInfo::CreatePointerLikeType(llvm::dwarf::Tag Tag,
                                     Align);
 }
 
-llvm::MDType *CGDebugInfo::getOrCreateStructPtrType(StringRef Name,
-                                                    llvm::MDType *&Cache) {
+llvm::DIType *CGDebugInfo::getOrCreateStructPtrType(StringRef Name,
+                                                    llvm::DIType *&Cache) {
   if (Cache)
     return Cache;
   Cache = DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type, Name,
@@ -689,8 +689,8 @@ llvm::MDType *CGDebugInfo::getOrCreateStructPtrType(StringRef Name,
   return Cache;
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const BlockPointerType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const BlockPointerType *Ty,
+                                      llvm::DIFile *Unit) {
   if (BlockLiteralGeneric)
     return BlockLiteralGeneric;
 
@@ -698,7 +698,7 @@ llvm::MDType *CGDebugInfo::CreateType(const BlockPointerType *Ty,
   QualType FType;
   uint64_t FieldSize, FieldOffset;
   unsigned FieldAlign;
-  llvm::DebugNodeArray Elements;
+  llvm::DINodeArray Elements;
 
   FieldOffset = 0;
   FType = CGM.getContext().UnsignedLongTy;
@@ -708,7 +708,7 @@ llvm::MDType *CGDebugInfo::CreateType(const BlockPointerType *Ty,
   Elements = DBuilder.getOrCreateArray(EltTys);
   EltTys.clear();
 
-  unsigned Flags = llvm::DebugNode::FlagAppleBlock;
+  unsigned Flags = llvm::DINode::FlagAppleBlock;
   unsigned LineNo = getLineNumber(CurLoc);
 
   auto *EltTy =
@@ -747,10 +747,10 @@ llvm::MDType *CGDebugInfo::CreateType(const BlockPointerType *Ty,
   return BlockLiteralGeneric;
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty,
+                                      llvm::DIFile *Unit) {
   assert(Ty->isTypeAlias());
-  llvm::MDType *Src = getOrCreateType(Ty->getAliasedType(), Unit);
+  llvm::DIType *Src = getOrCreateType(Ty->getAliasedType(), Unit);
 
   SmallString<128> NS;
   llvm::raw_svector_ostream OS(NS);
@@ -770,8 +770,8 @@ llvm::MDType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty,
       getContextDescriptor(cast<Decl>(AliasDecl->getDeclContext())));
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const TypedefType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const TypedefType *Ty,
+                                      llvm::DIFile *Unit) {
   // We don't set size information, but do specify where the typedef was
   // declared.
   SourceLocation Loc = Ty->getDecl()->getLocation();
@@ -783,8 +783,8 @@ llvm::MDType *CGDebugInfo::CreateType(const TypedefType *Ty,
       getContextDescriptor(cast<Decl>(Ty->getDecl()->getDeclContext())));
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const FunctionType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const FunctionType *Ty,
+                                      llvm::DIFile *Unit) {
   SmallVector<llvm::Metadata *, 16> EltTys;
 
   // Add the result type at least.
@@ -801,11 +801,11 @@ llvm::MDType *CGDebugInfo::CreateType(const FunctionType *Ty,
       EltTys.push_back(DBuilder.createUnspecifiedParameter());
   }
 
-  llvm::MDTypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(EltTys);
+  llvm::DITypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(EltTys);
   return DBuilder.createSubroutineType(Unit, EltTypeArray);
 }
 
-/// Convert an AccessSpecifier into the corresponding DebugNode flag.
+/// 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) {
@@ -820,25 +820,25 @@ static unsigned getAccessFlag(AccessSpecifier Access, const RecordDecl *RD) {
 
   switch (Access) {
   case clang::AS_private:
-    return llvm::DebugNode::FlagPrivate;
+    return llvm::DINode::FlagPrivate;
   case clang::AS_protected:
-    return llvm::DebugNode::FlagProtected;
+    return llvm::DINode::FlagProtected;
   case clang::AS_public:
-    return llvm::DebugNode::FlagPublic;
+    return llvm::DINode::FlagPublic;
   case clang::AS_none:
     return 0;
   }
   llvm_unreachable("unexpected access enumerator");
 }
 
-llvm::MDType *CGDebugInfo::createFieldType(
+llvm::DIType *CGDebugInfo::createFieldType(
     StringRef name, QualType type, uint64_t sizeInBitsOverride,
     SourceLocation loc, AccessSpecifier AS, uint64_t offsetInBits,
-    llvm::MDFile *tunit, llvm::MDScope *scope, const RecordDecl *RD) {
-  llvm::MDType *debugType = getOrCreateType(type, tunit);
+    llvm::DIFile *tunit, llvm::DIScope *scope, const RecordDecl *RD) {
+  llvm::DIType *debugType = getOrCreateType(type, tunit);
 
   // Get the location for the field.
-  llvm::MDFile *file = getOrCreateFile(loc);
+  llvm::DIFile *file = getOrCreateFile(loc);
   unsigned line = getLineNumber(loc);
 
   uint64_t SizeInBits = 0;
@@ -860,7 +860,7 @@ llvm::MDType *CGDebugInfo::createFieldType(
 /// CollectRecordLambdaFields - Helper for CollectRecordFields.
 void CGDebugInfo::CollectRecordLambdaFields(
     const CXXRecordDecl *CXXDecl, SmallVectorImpl<llvm::Metadata *> &elements,
-    llvm::MDType *RecordTy) {
+    llvm::DIType *RecordTy) {
   // For C++11 Lambdas a Field will be the same as a Capture, but the Capture
   // has the name and the location of the variable so we should iterate over
   // both concurrently.
@@ -873,14 +873,14 @@ void CGDebugInfo::CollectRecordLambdaFields(
     const LambdaCapture &C = *I;
     if (C.capturesVariable()) {
       VarDecl *V = C.getCapturedVar();
-      llvm::MDFile *VUnit = getOrCreateFile(C.getLocation());
+      llvm::DIFile *VUnit = getOrCreateFile(C.getLocation());
       StringRef VName = V->getName();
       uint64_t SizeInBitsOverride = 0;
       if (Field->isBitField()) {
         SizeInBitsOverride = Field->getBitWidthValue(CGM.getContext());
         assert(SizeInBitsOverride && "found named 0-width bitfield");
       }
-      llvm::MDType *fieldType = createFieldType(
+      llvm::DIType *fieldType = createFieldType(
           VName, Field->getType(), SizeInBitsOverride, C.getLocation(),
           Field->getAccess(), layout.getFieldOffset(fieldno), VUnit, RecordTy,
           CXXDecl);
@@ -891,9 +891,9 @@ void CGDebugInfo::CollectRecordLambdaFields(
       // by using AT_object_pointer for the function and having that be
       // used as 'this' for semantic references.
       FieldDecl *f = *Field;
-      llvm::MDFile *VUnit = getOrCreateFile(f->getLocation());
+      llvm::DIFile *VUnit = getOrCreateFile(f->getLocation());
       QualType type = f->getType();
-      llvm::MDType *fieldType = createFieldType(
+      llvm::DIType *fieldType = createFieldType(
           "this", type, 0, f->getLocation(), f->getAccess(),
           layout.getFieldOffset(fieldno), VUnit, RecordTy, CXXDecl);
 
@@ -903,14 +903,14 @@ void CGDebugInfo::CollectRecordLambdaFields(
 }
 
 /// Helper for CollectRecordFields.
-llvm::MDDerivedType *
-CGDebugInfo::CreateRecordStaticField(const VarDecl *Var, llvm::MDType *RecordTy,
+llvm::DIDerivedType *
+CGDebugInfo::CreateRecordStaticField(const VarDecl *Var, llvm::DIType *RecordTy,
                                      const RecordDecl *RD) {
   // Create the descriptor for the static variable, with or without
   // constant initializers.
   Var = Var->getCanonicalDecl();
-  llvm::MDFile *VUnit = getOrCreateFile(Var->getLocation());
-  llvm::MDType *VTy = getOrCreateType(Var->getType(), VUnit);
+  llvm::DIFile *VUnit = getOrCreateFile(Var->getLocation());
+  llvm::DIType *VTy = getOrCreateType(Var->getType(), VUnit);
 
   unsigned LineNumber = getLineNumber(Var->getLocation());
   StringRef VName = Var->getName();
@@ -926,7 +926,7 @@ CGDebugInfo::CreateRecordStaticField(const VarDecl *Var, llvm::MDType *RecordTy,
   }
 
   unsigned Flags = getAccessFlag(Var->getAccess(), RD);
-  llvm::MDDerivedType *GV = DBuilder.createStaticMemberType(
+  llvm::DIDerivedType *GV = DBuilder.createStaticMemberType(
       RecordTy, VName, VUnit, LineNumber, VTy, Flags, C);
   StaticDataMemberCache[Var->getCanonicalDecl()].reset(GV);
   return GV;
@@ -934,8 +934,8 @@ CGDebugInfo::CreateRecordStaticField(const VarDecl *Var, llvm::MDType *RecordTy,
 
 /// CollectRecordNormalField - Helper for CollectRecordFields.
 void CGDebugInfo::CollectRecordNormalField(
-    const FieldDecl *field, uint64_t OffsetInBits, llvm::MDFile *tunit,
-    SmallVectorImpl<llvm::Metadata *> &elements, llvm::MDType *RecordTy,
+    const FieldDecl *field, uint64_t OffsetInBits, llvm::DIFile *tunit,
+    SmallVectorImpl<llvm::Metadata *> &elements, llvm::DIType *RecordTy,
     const RecordDecl *RD) {
   StringRef name = field->getName();
   QualType type = field->getType();
@@ -950,7 +950,7 @@ void CGDebugInfo::CollectRecordNormalField(
     assert(SizeInBitsOverride && "found named 0-width bitfield");
   }
 
-  llvm::MDType *fieldType =
+  llvm::DIType *fieldType =
       createFieldType(name, type, SizeInBitsOverride, field->getLocation(),
                       field->getAccess(), OffsetInBits, tunit, RecordTy, RD);
 
@@ -960,9 +960,9 @@ void CGDebugInfo::CollectRecordNormalField(
 /// CollectRecordFields - A helper function to collect debug info for
 /// record fields. This is used while creating debug info entry for a Record.
 void CGDebugInfo::CollectRecordFields(
-    const RecordDecl *record, llvm::MDFile *tunit,
+    const RecordDecl *record, llvm::DIFile *tunit,
     SmallVectorImpl<llvm::Metadata *> &elements,
-    llvm::MDCompositeType *RecordTy) {
+    llvm::DICompositeType *RecordTy) {
   const CXXRecordDecl *CXXDecl = dyn_cast<CXXRecordDecl>(record);
 
   if (CXXDecl && CXXDecl->isLambda())
@@ -982,7 +982,7 @@ void CGDebugInfo::CollectRecordFields(
         if (MI != StaticDataMemberCache.end()) {
           assert(MI->second &&
                  "Static data member declaration should still exist");
-          elements.push_back(cast<llvm::MDDerivedTypeBase>(MI->second));
+          elements.push_back(cast<llvm::DIDerivedTypeBase>(MI->second));
         } else {
           auto Field = CreateRecordStaticField(V, RecordTy, record);
           elements.push_back(Field);
@@ -1000,22 +1000,22 @@ void CGDebugInfo::CollectRecordFields(
 /// getOrCreateMethodType - CXXMethodDecl's type is a FunctionType. This
 /// function type is not updated to include implicit "this" pointer. Use this
 /// routine to get a method type which includes "this" pointer.
-llvm::MDSubroutineType *
+llvm::DISubroutineType *
 CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method,
-                                   llvm::MDFile *Unit) {
+                                   llvm::DIFile *Unit) {
   const FunctionProtoType *Func = Method->getType()->getAs<FunctionProtoType>();
   if (Method->isStatic())
-    return cast_or_null<llvm::MDSubroutineType>(
+    return cast_or_null<llvm::DISubroutineType>(
         getOrCreateType(QualType(Func, 0), Unit));
   return getOrCreateInstanceMethodType(Method->getThisType(CGM.getContext()),
                                        Func, Unit);
 }
 
-llvm::MDSubroutineType *CGDebugInfo::getOrCreateInstanceMethodType(
-    QualType ThisPtr, const FunctionProtoType *Func, llvm::MDFile *Unit) {
+llvm::DISubroutineType *CGDebugInfo::getOrCreateInstanceMethodType(
+    QualType ThisPtr, const FunctionProtoType *Func, llvm::DIFile *Unit) {
   // Add "this" pointer.
-  llvm::MDTypeRefArray Args(
-      cast<llvm::MDSubroutineType>(getOrCreateType(QualType(Func, 0), Unit))
+  llvm::DITypeRefArray Args(
+      cast<llvm::DISubroutineType>(getOrCreateType(QualType(Func, 0), Unit))
           ->getTypeArray());
   assert(Args.size() && "Invalid number of arguments!");
 
@@ -1033,8 +1033,8 @@ llvm::MDSubroutineType *CGDebugInfo::getOrCreateInstanceMethodType(
     unsigned AS = CGM.getContext().getTargetAddressSpace(PointeeTy);
     uint64_t Size = CGM.getTarget().getPointerWidth(AS);
     uint64_t Align = CGM.getContext().getTypeAlign(ThisPtrTy);
-    llvm::MDType *PointeeType = getOrCreateType(PointeeTy, Unit);
-    llvm::MDType *ThisPtrType =
+    llvm::DIType *PointeeType = getOrCreateType(PointeeTy, Unit);
+    llvm::DIType *ThisPtrType =
         DBuilder.createPointerType(PointeeType, Size, Align);
     TypeCache[ThisPtr.getAsOpaquePtr()].reset(ThisPtrType);
     // TODO: This and the artificial type below are misleading, the
@@ -1043,7 +1043,7 @@ llvm::MDSubroutineType *CGDebugInfo::getOrCreateInstanceMethodType(
     ThisPtrType = DBuilder.createObjectPointerType(ThisPtrType);
     Elts.push_back(ThisPtrType);
   } else {
-    llvm::MDType *ThisPtrType = getOrCreateType(ThisPtr, Unit);
+    llvm::DIType *ThisPtrType = getOrCreateType(ThisPtr, Unit);
     TypeCache[ThisPtr.getAsOpaquePtr()].reset(ThisPtrType);
     ThisPtrType = DBuilder.createObjectPointerType(ThisPtrType);
     Elts.push_back(ThisPtrType);
@@ -1053,13 +1053,13 @@ llvm::MDSubroutineType *CGDebugInfo::getOrCreateInstanceMethodType(
   for (unsigned i = 1, e = Args.size(); i != e; ++i)
     Elts.push_back(Args[i]);
 
-  llvm::MDTypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(Elts);
+  llvm::DITypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(Elts);
 
   unsigned Flags = 0;
   if (Func->getExtProtoInfo().RefQualifier == RQ_LValue)
-    Flags |= llvm::DebugNode::FlagLValueReference;
+    Flags |= llvm::DINode::FlagLValueReference;
   if (Func->getExtProtoInfo().RefQualifier == RQ_RValue)
-    Flags |= llvm::DebugNode::FlagRValueReference;
+    Flags |= llvm::DINode::FlagRValueReference;
 
   return DBuilder.createSubroutineType(Unit, EltTypeArray, Flags);
 }
@@ -1076,13 +1076,13 @@ static bool isFunctionLocalClass(const CXXRecordDecl *RD) {
 
 /// CreateCXXMemberFunction - A helper function to create a subprogram for
 /// a single member function GlobalDecl.
-llvm::MDSubprogram *CGDebugInfo::CreateCXXMemberFunction(
-    const CXXMethodDecl *Method, llvm::MDFile *Unit, llvm::MDType *RecordTy) {
+llvm::DISubprogram *CGDebugInfo::CreateCXXMemberFunction(
+    const CXXMethodDecl *Method, llvm::DIFile *Unit, llvm::DIType *RecordTy) {
   bool IsCtorOrDtor =
       isa<CXXConstructorDecl>(Method) || isa<CXXDestructorDecl>(Method);
 
   StringRef MethodName = getFunctionName(Method);
-  llvm::MDSubroutineType *MethodTy = getOrCreateMethodType(Method, Unit);
+  llvm::DISubroutineType *MethodTy = getOrCreateMethodType(Method, Unit);
 
   // Since a single ctor/dtor corresponds to multiple functions, it doesn't
   // make sense to give a single ctor/dtor a linkage name.
@@ -1091,7 +1091,7 @@ llvm::MDSubprogram *CGDebugInfo::CreateCXXMemberFunction(
     MethodLinkageName = CGM.getMangledName(Method);
 
   // Get the location for the method.
-  llvm::MDFile *MethodDefUnit = nullptr;
+  llvm::DIFile *MethodDefUnit = nullptr;
   unsigned MethodLine = 0;
   if (!Method->isImplicit()) {
     MethodDefUnit = getOrCreateFile(Method->getLocation());
@@ -1099,7 +1099,7 @@ llvm::MDSubprogram *CGDebugInfo::CreateCXXMemberFunction(
   }
 
   // Collect virtual method info.
-  llvm::MDType *ContainingType = nullptr;
+  llvm::DIType *ContainingType = nullptr;
   unsigned Virtuality = 0;
   unsigned VIndex = 0;
 
@@ -1122,26 +1122,25 @@ llvm::MDSubprogram *CGDebugInfo::CreateCXXMemberFunction(
 
   unsigned Flags = 0;
   if (Method->isImplicit())
-    Flags |= llvm::DebugNode::FlagArtificial;
+    Flags |= llvm::DINode::FlagArtificial;
   Flags |= getAccessFlag(Method->getAccess(), Method->getParent());
   if (const CXXConstructorDecl *CXXC = dyn_cast<CXXConstructorDecl>(Method)) {
     if (CXXC->isExplicit())
-      Flags |= llvm::DebugNode::FlagExplicit;
+      Flags |= llvm::DINode::FlagExplicit;
   } else if (const CXXConversionDecl *CXXC =
                  dyn_cast<CXXConversionDecl>(Method)) {
     if (CXXC->isExplicit())
-      Flags |= llvm::DebugNode::FlagExplicit;
+      Flags |= llvm::DINode::FlagExplicit;
   }
   if (Method->hasPrototype())
-    Flags |= llvm::DebugNode::FlagPrototyped;
+    Flags |= llvm::DINode::FlagPrototyped;
   if (Method->getRefQualifier() == RQ_LValue)
-    Flags |= llvm::DebugNode::FlagLValueReference;
+    Flags |= llvm::DINode::FlagLValueReference;
   if (Method->getRefQualifier() == RQ_RValue)
-    Flags |= llvm::DebugNode::FlagRValueReference;
+    Flags |= llvm::DINode::FlagRValueReference;
 
-  llvm::DebugNodeArray TParamsArray =
-      CollectFunctionTemplateParams(Method, Unit);
-  llvm::MDSubprogram *SP = DBuilder.createMethod(
+  llvm::DINodeArray TParamsArray = CollectFunctionTemplateParams(Method, Unit);
+  llvm::DISubprogram *SP = DBuilder.createMethod(
       RecordTy, MethodName, MethodLinkageName, MethodDefUnit, MethodLine,
       MethodTy, /*isLocalToUnit=*/false,
       /* isDefinition=*/false, Virtuality, VIndex, ContainingType, Flags,
@@ -1156,8 +1155,8 @@ llvm::MDSubprogram *CGDebugInfo::CreateCXXMemberFunction(
 /// C++ member functions. This is used while creating debug info entry for
 /// a Record.
 void CGDebugInfo::CollectCXXMemberFunctions(
-    const CXXRecordDecl *RD, llvm::MDFile *Unit,
-    SmallVectorImpl<llvm::Metadata *> &EltTys, llvm::MDType *RecordTy) {
+    const CXXRecordDecl *RD, llvm::DIFile *Unit,
+    SmallVectorImpl<llvm::Metadata *> &EltTys, llvm::DIType *RecordTy) {
 
   // Since we want more than just the individual member decls if we
   // have templated functions iterate over every declaration to gather
@@ -1195,9 +1194,9 @@ void CGDebugInfo::CollectCXXMemberFunctions(
 /// CollectCXXBases - A helper function to collect debug info for
 /// C++ base classes. This is used while creating debug info entry for
 /// a Record.
-void CGDebugInfo::CollectCXXBases(const CXXRecordDecl *RD, llvm::MDFile *Unit,
+void CGDebugInfo::CollectCXXBases(const CXXRecordDecl *RD, llvm::DIFile *Unit,
                                   SmallVectorImpl<llvm::Metadata *> &EltTys,
-                                  llvm::MDType *RecordTy) {
+                                  llvm::DIType *RecordTy) {
   const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);
   for (const auto &BI : RD->bases()) {
     unsigned BFlags = 0;
@@ -1219,24 +1218,24 @@ void CGDebugInfo::CollectCXXBases(const CXXRecordDecl *RD, llvm::MDFile *Unit,
         BaseOffset =
             4 * CGM.getMicrosoftVTableContext().getVBTableIndex(RD, Base);
       }
-      BFlags = llvm::DebugNode::FlagVirtual;
+      BFlags = llvm::DINode::FlagVirtual;
     } else
       BaseOffset = CGM.getContext().toBits(RL.getBaseClassOffset(Base));
     // FIXME: Inconsistent units for BaseOffset. It is in bytes when
     // BI->isVirtual() and bits when not.
 
     BFlags |= getAccessFlag(BI.getAccessSpecifier(), RD);
-    llvm::MDType *DTy = DBuilder.createInheritance(
+    llvm::DIType *DTy = DBuilder.createInheritance(
         RecordTy, getOrCreateType(BI.getType(), Unit), BaseOffset, BFlags);
     EltTys.push_back(DTy);
   }
 }
 
 /// CollectTemplateParams - A helper function to collect template parameters.
-llvm::DebugNodeArray
+llvm::DINodeArray
 CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList,
                                    ArrayRef<TemplateArgument> TAList,
-                                   llvm::MDFile *Unit) {
+                                   llvm::DIFile *Unit) {
   SmallVector<llvm::Metadata *, 16> TemplateParams;
   for (unsigned i = 0, e = TAList.size(); i != e; ++i) {
     const TemplateArgument &TA = TAList[i];
@@ -1245,12 +1244,12 @@ CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList,
       Name = TPList->getParam(i)->getName();
     switch (TA.getKind()) {
     case TemplateArgument::Type: {
-      llvm::MDType *TTy = getOrCreateType(TA.getAsType(), Unit);
+      llvm::DIType *TTy = getOrCreateType(TA.getAsType(), Unit);
       TemplateParams.push_back(
           DBuilder.createTemplateTypeParameter(TheCU, Name, TTy));
     } break;
     case TemplateArgument::Integral: {
-      llvm::MDType *TTy = getOrCreateType(TA.getIntegralType(), Unit);
+      llvm::DIType *TTy = getOrCreateType(TA.getIntegralType(), Unit);
       TemplateParams.push_back(DBuilder.createTemplateValueParameter(
           TheCU, Name, TTy,
           llvm::ConstantInt::get(CGM.getLLVMContext(), TA.getAsIntegral())));
@@ -1258,7 +1257,7 @@ CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList,
     case TemplateArgument::Declaration: {
       const ValueDecl *D = TA.getAsDecl();
       QualType T = TA.getParamTypeForDecl().getDesugaredType(CGM.getContext());
-      llvm::MDType *TTy = getOrCreateType(T, Unit);
+      llvm::DIType *TTy = getOrCreateType(T, Unit);
       llvm::Constant *V = nullptr;
       const CXXMethodDecl *MD;
       // Variable pointer template parameters have a value that is the address
@@ -1288,7 +1287,7 @@ CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList,
     } break;
     case TemplateArgument::NullPtr: {
       QualType T = TA.getNullPtrType();
-      llvm::MDType *TTy = getOrCreateType(T, Unit);
+      llvm::DIType *TTy = getOrCreateType(T, Unit);
       llvm::Constant *V = nullptr;
       // Special case member data pointer null values since they're actually -1
       // instead of zero.
@@ -1323,7 +1322,7 @@ CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList,
         T = CGM.getContext().getLValueReferenceType(T);
       llvm::Constant *V = CGM.EmitConstantExpr(E, T);
       assert(V && "Expression in template argument isn't constant");
-      llvm::MDType *TTy = getOrCreateType(T, Unit);
+      llvm::DIType *TTy = getOrCreateType(T, Unit);
       TemplateParams.push_back(DBuilder.createTemplateValueParameter(
           TheCU, Name, TTy, cast<llvm::Constant>(V->stripPointerCasts())));
     } break;
@@ -1339,9 +1338,9 @@ CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList,
 
 /// CollectFunctionTemplateParams - A helper function to collect debug
 /// info for function template parameters.
-llvm::DebugNodeArray
+llvm::DINodeArray
 CGDebugInfo::CollectFunctionTemplateParams(const FunctionDecl *FD,
-                                           llvm::MDFile *Unit) {
+                                           llvm::DIFile *Unit) {
   if (FD->getTemplatedKind() ==
       FunctionDecl::TK_FunctionTemplateSpecialization) {
     const TemplateParameterList *TList = FD->getTemplateSpecializationInfo()
@@ -1350,13 +1349,13 @@ CGDebugInfo::CollectFunctionTemplateParams(const FunctionDecl *FD,
     return CollectTemplateParams(
         TList, FD->getTemplateSpecializationArgs()->asArray(), Unit);
   }
-  return llvm::DebugNodeArray();
+  return llvm::DINodeArray();
 }
 
 /// CollectCXXTemplateParams - A helper function to collect debug info for
 /// template parameters.
-llvm::DebugNodeArray CGDebugInfo::CollectCXXTemplateParams(
-    const ClassTemplateSpecializationDecl *TSpecial, llvm::MDFile *Unit) {
+llvm::DINodeArray CGDebugInfo::CollectCXXTemplateParams(
+    const ClassTemplateSpecializationDecl *TSpecial, llvm::DIFile *Unit) {
   // Always get the full list of parameters, not just the ones from
   // the specialization.
   TemplateParameterList *TPList =
@@ -1366,7 +1365,7 @@ llvm::DebugNodeArray CGDebugInfo::CollectCXXTemplateParams(
 }
 
 /// getOrCreateVTablePtrType - Return debug info descriptor for vtable.
-llvm::MDType *CGDebugInfo::getOrCreateVTablePtrType(llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::getOrCreateVTablePtrType(llvm::DIFile *Unit) {
   if (VTablePtrType)
     return VTablePtrType;
 
@@ -1374,10 +1373,10 @@ llvm::MDType *CGDebugInfo::getOrCreateVTablePtrType(llvm::MDFile *Unit) {
 
   /* Function type */
   llvm::Metadata *STy = getOrCreateType(Context.IntTy, Unit);
-  llvm::MDTypeRefArray SElements = DBuilder.getOrCreateTypeArray(STy);
-  llvm::MDType *SubTy = DBuilder.createSubroutineType(Unit, SElements);
+  llvm::DITypeRefArray SElements = DBuilder.getOrCreateTypeArray(STy);
+  llvm::DIType *SubTy = DBuilder.createSubroutineType(Unit, SElements);
   unsigned Size = Context.getTypeSize(Context.VoidPtrTy);
-  llvm::MDType *vtbl_ptr_type =
+  llvm::DIType *vtbl_ptr_type =
       DBuilder.createPointerType(SubTy, Size, 0, "__vtbl_ptr_type");
   VTablePtrType = DBuilder.createPointerType(vtbl_ptr_type, Size);
   return VTablePtrType;
@@ -1391,7 +1390,7 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) {
 
 /// CollectVTableInfo - If the C++ class has vtable info then insert appropriate
 /// debug info entry in EltTys vector.
-void CGDebugInfo::CollectVTableInfo(const CXXRecordDecl *RD, llvm::MDFile *Unit,
+void CGDebugInfo::CollectVTableInfo(const CXXRecordDecl *RD, llvm::DIFile *Unit,
                                     SmallVectorImpl<llvm::Metadata *> &EltTys) {
   const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);
 
@@ -1404,26 +1403,26 @@ void CGDebugInfo::CollectVTableInfo(const CXXRecordDecl *RD, llvm::MDFile *Unit,
     return;
 
   unsigned Size = CGM.getContext().getTypeSize(CGM.getContext().VoidPtrTy);
-  llvm::MDType *VPTR = DBuilder.createMemberType(
+  llvm::DIType *VPTR = DBuilder.createMemberType(
       Unit, getVTableName(RD), Unit, 0, Size, 0, 0,
-      llvm::DebugNode::FlagArtificial, getOrCreateVTablePtrType(Unit));
+      llvm::DINode::FlagArtificial, getOrCreateVTablePtrType(Unit));
   EltTys.push_back(VPTR);
 }
 
 /// getOrCreateRecordType - Emit record type's standalone debug info.
-llvm::MDType *CGDebugInfo::getOrCreateRecordType(QualType RTy,
+llvm::DIType *CGDebugInfo::getOrCreateRecordType(QualType RTy,
                                                  SourceLocation Loc) {
   assert(DebugKind >= CodeGenOptions::LimitedDebugInfo);
-  llvm::MDType *T = getOrCreateType(RTy, getOrCreateFile(Loc));
+  llvm::DIType *T = getOrCreateType(RTy, getOrCreateFile(Loc));
   return T;
 }
 
 /// getOrCreateInterfaceType - Emit an objective c interface type standalone
 /// debug info.
-llvm::MDType *CGDebugInfo::getOrCreateInterfaceType(QualType D,
+llvm::DIType *CGDebugInfo::getOrCreateInterfaceType(QualType D,
                                                     SourceLocation Loc) {
   assert(DebugKind >= CodeGenOptions::LimitedDebugInfo);
-  llvm::MDType *T = getOrCreateType(D, getOrCreateFile(Loc));
+  llvm::DIType *T = getOrCreateType(D, getOrCreateFile(Loc));
   RetainedTypes.push_back(D.getAsOpaquePtr());
   return T;
 }
@@ -1434,9 +1433,9 @@ void CGDebugInfo::completeType(const EnumDecl *ED) {
   QualType Ty = CGM.getContext().getEnumType(ED);
   void *TyPtr = Ty.getAsOpaquePtr();
   auto I = TypeCache.find(TyPtr);
-  if (I == TypeCache.end() || !cast<llvm::MDType>(I->second)->isForwardDecl())
+  if (I == TypeCache.end() || !cast<llvm::DIType>(I->second)->isForwardDecl())
     return;
-  llvm::MDType *Res = CreateTypeDefinition(Ty->castAs<EnumType>());
+  llvm::DIType *Res = CreateTypeDefinition(Ty->castAs<EnumType>());
   assert(!Res->isForwardDecl());
   TypeCache[TyPtr].reset(Res);
 }
@@ -1456,7 +1455,7 @@ void CGDebugInfo::completeRequiredType(const RecordDecl *RD) {
       return;
 
   QualType Ty = CGM.getContext().getRecordType(RD);
-  llvm::MDType *T = getTypeOrNull(Ty);
+  llvm::DIType *T = getTypeOrNull(Ty);
   if (T && T->isForwardDecl())
     completeClassData(RD);
 }
@@ -1467,9 +1466,9 @@ void CGDebugInfo::completeClassData(const RecordDecl *RD) {
   QualType Ty = CGM.getContext().getRecordType(RD);
   void *TyPtr = Ty.getAsOpaquePtr();
   auto I = TypeCache.find(TyPtr);
-  if (I != TypeCache.end() && !cast<llvm::MDType>(I->second)->isForwardDecl())
+  if (I != TypeCache.end() && !cast<llvm::DIType>(I->second)->isForwardDecl())
     return;
-  llvm::MDType *Res = CreateTypeDefinition(Ty->castAs<RecordType>());
+  llvm::DIType *Res = CreateTypeDefinition(Ty->castAs<RecordType>());
   assert(!Res->isForwardDecl());
   TypeCache[TyPtr].reset(Res);
 }
@@ -1518,9 +1517,9 @@ static bool shouldOmitDefinition(CodeGenOptions::DebugInfoKind DebugKind,
 }
 
 /// CreateType - get structure or union type.
-llvm::MDType *CGDebugInfo::CreateType(const RecordType *Ty) {
+llvm::DIType *CGDebugInfo::CreateType(const RecordType *Ty) {
   RecordDecl *RD = Ty->getDecl();
-  llvm::MDType *T = cast_or_null<llvm::MDType>(getTypeOrNull(QualType(Ty, 0)));
+  llvm::DIType *T = cast_or_null<llvm::DIType>(getTypeOrNull(QualType(Ty, 0)));
   if (T || shouldOmitDefinition(DebugKind, RD, CGM.getLangOpts())) {
     if (!T)
       T = getOrCreateRecordFwdDecl(
@@ -1531,11 +1530,11 @@ llvm::MDType *CGDebugInfo::CreateType(const RecordType *Ty) {
   return CreateTypeDefinition(Ty);
 }
 
-llvm::MDType *CGDebugInfo::CreateTypeDefinition(const RecordType *Ty) {
+llvm::DIType *CGDebugInfo::CreateTypeDefinition(const RecordType *Ty) {
   RecordDecl *RD = Ty->getDecl();
 
   // Get overall information about the record type for the debug info.
-  llvm::MDFile *DefUnit = getOrCreateFile(RD->getLocation());
+  llvm::DIFile *DefUnit = getOrCreateFile(RD->getLocation());
 
   // Records and classes and unions can all be recursive.  To handle them, we
   // first generate a debug descriptor for the struct as a forward declaration.
@@ -1545,7 +1544,7 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const RecordType *Ty) {
   // uses of the forward declaration with the final definition.
 
   auto *FwdDecl =
-      cast<llvm::MDCompositeType>(getOrCreateLimitedType(Ty, DefUnit));
+      cast<llvm::DICompositeType>(getOrCreateLimitedType(Ty, DefUnit));
 
   const RecordDecl *D = RD->getDefinition();
   if (!D || !D->isCompleteDefinition())
@@ -1580,20 +1579,20 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const RecordType *Ty) {
   LexicalBlockStack.pop_back();
   RegionMap.erase(Ty->getDecl());
 
-  llvm::DebugNodeArray Elements = DBuilder.getOrCreateArray(EltTys);
+  llvm::DINodeArray Elements = DBuilder.getOrCreateArray(EltTys);
   DBuilder.replaceArrays(FwdDecl, Elements);
 
   if (FwdDecl->isTemporary())
     FwdDecl =
-        llvm::MDNode::replaceWithPermanent(llvm::TempMDCompositeType(FwdDecl));
+        llvm::MDNode::replaceWithPermanent(llvm::TempDICompositeType(FwdDecl));
 
   RegionMap[Ty->getDecl()].reset(FwdDecl);
   return FwdDecl;
 }
 
 /// CreateType - get objective-c object type.
-llvm::MDType *CGDebugInfo::CreateType(const ObjCObjectType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const ObjCObjectType *Ty,
+                                      llvm::DIFile *Unit) {
   // Ignore protocols.
   return getOrCreateType(Ty->getBaseType(), Unit);
 }
@@ -1623,14 +1622,14 @@ static bool hasDefaultSetterName(const ObjCPropertyDecl *PD,
 }
 
 /// CreateType - get objective-c interface type.
-llvm::MDType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
+                                      llvm::DIFile *Unit) {
   ObjCInterfaceDecl *ID = Ty->getDecl();
   if (!ID)
     return nullptr;
 
   // Get overall information about the record type for the debug info.
-  llvm::MDFile *DefUnit = getOrCreateFile(ID->getLocation());
+  llvm::DIFile *DefUnit = getOrCreateFile(ID->getLocation());
   unsigned Line = getLineNumber(ID->getLocation());
   auto RuntimeLang =
       static_cast<llvm::dwarf::SourceLanguage>(TheCU->getSourceLanguage());
@@ -1639,7 +1638,7 @@ llvm::MDType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
   // debug type since we won't be able to lay out the entire type.
   ObjCInterfaceDecl *Def = ID->getDefinition();
   if (!Def || !Def->getImplementation()) {
-    llvm::MDType *FwdDecl = DBuilder.createReplaceableCompositeType(
+    llvm::DIType *FwdDecl = DBuilder.createReplaceableCompositeType(
         llvm::dwarf::DW_TAG_structure_type, ID->getName(), TheCU, DefUnit, Line,
         RuntimeLang);
     ObjCInterfaceCache.push_back(ObjCInterfaceCacheEntry(Ty, FwdDecl, Unit));
@@ -1649,10 +1648,10 @@ llvm::MDType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
   return CreateTypeDefinition(Ty, Unit);
 }
 
-llvm::MDType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
-                                                llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
+                                                llvm::DIFile *Unit) {
   ObjCInterfaceDecl *ID = Ty->getDecl();
-  llvm::MDFile *DefUnit = getOrCreateFile(ID->getLocation());
+  llvm::DIFile *DefUnit = getOrCreateFile(ID->getLocation());
   unsigned Line = getLineNumber(ID->getLocation());
   unsigned RuntimeLang = TheCU->getSourceLanguage();
 
@@ -1662,11 +1661,11 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
 
   unsigned Flags = 0;
   if (ID->getImplementation())
-    Flags |= llvm::DebugNode::FlagObjcClassComplete;
+    Flags |= llvm::DINode::FlagObjcClassComplete;
 
-  llvm::MDCompositeType *RealDecl = DBuilder.createStructType(
+  llvm::DICompositeType *RealDecl = DBuilder.createStructType(
       Unit, ID->getName(), DefUnit, Line, Size, Align, Flags, nullptr,
-      llvm::DebugNodeArray(), RuntimeLang);
+      llvm::DINodeArray(), RuntimeLang);
 
   QualType QTy(Ty, 0);
   TypeCache[QTy.getAsOpaquePtr()].reset(RealDecl);
@@ -1680,19 +1679,19 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
 
   ObjCInterfaceDecl *SClass = ID->getSuperClass();
   if (SClass) {
-    llvm::MDType *SClassTy =
+    llvm::DIType *SClassTy =
         getOrCreateType(CGM.getContext().getObjCInterfaceType(SClass), Unit);
     if (!SClassTy)
       return nullptr;
 
-    llvm::MDType *InhTag = DBuilder.createInheritance(RealDecl, SClassTy, 0, 0);
+    llvm::DIType *InhTag = DBuilder.createInheritance(RealDecl, SClassTy, 0, 0);
     EltTys.push_back(InhTag);
   }
 
   // Create entries for all of the properties.
   for (const auto *PD : ID->properties()) {
     SourceLocation Loc = PD->getLocation();
-    llvm::MDFile *PUnit = getOrCreateFile(Loc);
+    llvm::DIFile *PUnit = getOrCreateFile(Loc);
     unsigned PLine = getLineNumber(Loc);
     ObjCMethodDecl *Getter = PD->getGetterMethodDecl();
     ObjCMethodDecl *Setter = PD->getSetterMethodDecl();
@@ -1710,7 +1709,7 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
   unsigned FieldNo = 0;
   for (ObjCIvarDecl *Field = ID->all_declared_ivar_begin(); Field;
        Field = Field->getNextIvar(), ++FieldNo) {
-    llvm::MDType *FieldTy = getOrCreateType(Field->getType(), Unit);
+    llvm::DIType *FieldTy = getOrCreateType(Field->getType(), Unit);
     if (!FieldTy)
       return nullptr;
 
@@ -1721,7 +1720,7 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
       continue;
 
     // Get the location for the field.
-    llvm::MDFile *FieldDefUnit = getOrCreateFile(Field->getLocation());
+    llvm::DIFile *FieldDefUnit = getOrCreateFile(Field->getLocation());
     unsigned FieldLine = getLineNumber(Field->getLocation());
     QualType FType = Field->getType();
     uint64_t FieldSize = 0;
@@ -1754,11 +1753,11 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
 
     unsigned Flags = 0;
     if (Field->getAccessControl() == ObjCIvarDecl::Protected)
-      Flags = llvm::DebugNode::FlagProtected;
+      Flags = llvm::DINode::FlagProtected;
     else if (Field->getAccessControl() == ObjCIvarDecl::Private)
-      Flags = llvm::DebugNode::FlagPrivate;
+      Flags = llvm::DINode::FlagPrivate;
     else if (Field->getAccessControl() == ObjCIvarDecl::Public)
-      Flags = llvm::DebugNode::FlagPublic;
+      Flags = llvm::DINode::FlagPublic;
 
     llvm::MDNode *PropertyNode = nullptr;
     if (ObjCImplementationDecl *ImpD = ID->getImplementation()) {
@@ -1766,7 +1765,7 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
               ImpD->FindPropertyImplIvarDecl(Field->getIdentifier())) {
         if (ObjCPropertyDecl *PD = PImpD->getPropertyDecl()) {
           SourceLocation Loc = PD->getLocation();
-          llvm::MDFile *PUnit = getOrCreateFile(Loc);
+          llvm::DIFile *PUnit = getOrCreateFile(Loc);
           unsigned PLine = getLineNumber(Loc);
           ObjCMethodDecl *Getter = PD->getGetterMethodDecl();
           ObjCMethodDecl *Setter = PD->getSetterMethodDecl();
@@ -1787,16 +1786,16 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty,
     EltTys.push_back(FieldTy);
   }
 
-  llvm::DebugNodeArray Elements = DBuilder.getOrCreateArray(EltTys);
+  llvm::DINodeArray Elements = DBuilder.getOrCreateArray(EltTys);
   DBuilder.replaceArrays(RealDecl, Elements);
 
   LexicalBlockStack.pop_back();
   return RealDecl;
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const VectorType *Ty,
-                                      llvm::MDFile *Unit) {
-  llvm::MDType *ElementTy = getOrCreateType(Ty->getElementType(), Unit);
+llvm::DIType *CGDebugInfo::CreateType(const VectorType *Ty,
+                                      llvm::DIFile *Unit) {
+  llvm::DIType *ElementTy = getOrCreateType(Ty->getElementType(), Unit);
   int64_t Count = Ty->getNumElements();
   if (Count == 0)
     // If number of elements are not known then this is an unbounded array.
@@ -1804,7 +1803,7 @@ llvm::MDType *CGDebugInfo::CreateType(const VectorType *Ty,
     Count = -1;
 
   llvm::Metadata *Subscript = DBuilder.getOrCreateSubrange(0, Count);
-  llvm::DebugNodeArray SubscriptArray = DBuilder.getOrCreateArray(Subscript);
+  llvm::DINodeArray SubscriptArray = DBuilder.getOrCreateArray(Subscript);
 
   uint64_t Size = CGM.getContext().getTypeSize(Ty);
   uint64_t Align = CGM.getContext().getTypeAlign(Ty);
@@ -1812,7 +1811,7 @@ llvm::MDType *CGDebugInfo::CreateType(const VectorType *Ty,
   return DBuilder.createVectorType(Size, Align, ElementTy, SubscriptArray);
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const ArrayType *Ty, llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const ArrayType *Ty, llvm::DIFile *Unit) {
   uint64_t Size;
   uint64_t Align;
 
@@ -1858,27 +1857,27 @@ llvm::MDType *CGDebugInfo::CreateType(const ArrayType *Ty, llvm::MDFile *Unit) {
     EltTy = Ty->getElementType();
   }
 
-  llvm::DebugNodeArray SubscriptArray = DBuilder.getOrCreateArray(Subscripts);
+  llvm::DINodeArray SubscriptArray = DBuilder.getOrCreateArray(Subscripts);
 
   return DBuilder.createArrayType(Size, Align, getOrCreateType(EltTy, Unit),
                                   SubscriptArray);
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const LValueReferenceType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const LValueReferenceType *Ty,
+                                      llvm::DIFile *Unit) {
   return CreatePointerLikeType(llvm::dwarf::DW_TAG_reference_type, Ty,
                                Ty->getPointeeType(), Unit);
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const RValueReferenceType *Ty,
-                                      llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateType(const RValueReferenceType *Ty,
+                                      llvm::DIFile *Unit) {
   return CreatePointerLikeType(llvm::dwarf::DW_TAG_rvalue_reference_type, Ty,
                                Ty->getPointeeType(), Unit);
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const MemberPointerType *Ty,
-                                      llvm::MDFile *U) {
-  llvm::MDType *ClassType = getOrCreateType(QualType(Ty->getClass(), 0), U);
+llvm::DIType *CGDebugInfo::CreateType(const MemberPointerType *Ty,
+                                      llvm::DIFile *U) {
+  llvm::DIType *ClassType = getOrCreateType(QualType(Ty->getClass(), 0), U);
   if (Ty->isMemberDataPointerType())
     return DBuilder.createMemberPointerType(
       getOrCreateType(Ty->getPointeeType(), U), ClassType,
@@ -1893,14 +1892,14 @@ llvm::MDType *CGDebugInfo::CreateType(const MemberPointerType *Ty,
       ClassType, CGM.getContext().getTypeSize(Ty));
 }
 
-llvm::MDType *CGDebugInfo::CreateType(const AtomicType *Ty, llvm::MDFile *U) {
+llvm::DIType *CGDebugInfo::CreateType(const AtomicType *Ty, llvm::DIFile *U) {
   // Ignore the atomic wrapping
   // FIXME: What is the correct representation?
   return getOrCreateType(Ty->getValueType(), U);
 }
 
 /// CreateEnumType - get enumeration type.
-llvm::MDType *CGDebugInfo::CreateEnumType(const EnumType *Ty) {
+llvm::DIType *CGDebugInfo::CreateEnumType(const EnumType *Ty) {
   const EnumDecl *ED = Ty->getDecl();
   uint64_t Size = 0;
   uint64_t Align = 0;
@@ -1914,14 +1913,14 @@ llvm::MDType *CGDebugInfo::CreateEnumType(const EnumType *Ty) {
   // If this is just a forward declaration, construct an appropriately
   // marked node and just return it.
   if (!ED->getDefinition()) {
-    llvm::MDScope *EDContext =
+    llvm::DIScope *EDContext =
         getContextDescriptor(cast<Decl>(ED->getDeclContext()));
-    llvm::MDFile *DefUnit = getOrCreateFile(ED->getLocation());
+    llvm::DIFile *DefUnit = getOrCreateFile(ED->getLocation());
     unsigned Line = getLineNumber(ED->getLocation());
     StringRef EDName = ED->getName();
-    llvm::MDType *RetTy = DBuilder.createReplaceableCompositeType(
+    llvm::DIType *RetTy = DBuilder.createReplaceableCompositeType(
         llvm::dwarf::DW_TAG_enumeration_type, EDName, EDContext, DefUnit, Line,
-        0, Size, Align, llvm::DebugNode::FlagFwdDecl, FullName);
+        0, Size, Align, llvm::DINode::FlagFwdDecl, FullName);
     ReplaceMap.emplace_back(
         std::piecewise_construct, std::make_tuple(Ty),
         std::make_tuple(static_cast<llvm::Metadata *>(RetTy)));
@@ -1931,7 +1930,7 @@ llvm::MDType *CGDebugInfo::CreateEnumType(const EnumType *Ty) {
   return CreateTypeDefinition(Ty);
 }
 
-llvm::MDType *CGDebugInfo::CreateTypeDefinition(const EnumType *Ty) {
+llvm::DIType *CGDebugInfo::CreateTypeDefinition(const EnumType *Ty) {
   const EnumDecl *ED = Ty->getDecl();
   uint64_t Size = 0;
   uint64_t Align = 0;
@@ -1951,13 +1950,13 @@ llvm::MDType *CGDebugInfo::CreateTypeDefinition(const EnumType *Ty) {
   }
 
   // Return a CompositeType for the enum itself.
-  llvm::DebugNodeArray EltArray = DBuilder.getOrCreateArray(Enumerators);
+  llvm::DINodeArray EltArray = DBuilder.getOrCreateArray(Enumerators);
 
-  llvm::MDFile *DefUnit = getOrCreateFile(ED->getLocation());
+  llvm::DIFile *DefUnit = getOrCreateFile(ED->getLocation());
   unsigned Line = getLineNumber(ED->getLocation());
-  llvm::MDScope *EnumContext =
+  llvm::DIScope *EnumContext =
       getContextDescriptor(cast<Decl>(ED->getDeclContext()));
-  llvm::MDType *ClassTy =
+  llvm::DIType *ClassTy =
       ED->isFixed() ? getOrCreateType(ED->getIntegerType(), DefUnit) : nullptr;
   return DBuilder.createEnumerationType(EnumContext, ED->getName(), DefUnit,
                                         Line, Size, Align, EltArray, ClassTy,
@@ -2021,7 +2020,7 @@ static QualType UnwrapTypeForDebugInfo(QualType T, const ASTContext &C) {
 
 /// getType - Get the type from the cache or return null type if it doesn't
 /// exist.
-llvm::MDType *CGDebugInfo::getTypeOrNull(QualType Ty) {
+llvm::DIType *CGDebugInfo::getTypeOrNull(QualType Ty) {
 
   // Unwrap the type as needed for debug information.
   Ty = UnwrapTypeForDebugInfo(Ty, CGM.getContext());
@@ -2030,7 +2029,7 @@ llvm::MDType *CGDebugInfo::getTypeOrNull(QualType Ty) {
   if (it != TypeCache.end()) {
     // Verify that the debug info still exists.
     if (llvm::Metadata *V = it->second)
-      return cast<llvm::MDType>(V);
+      return cast<llvm::DIType>(V);
   }
 
   return nullptr;
@@ -2049,7 +2048,7 @@ void CGDebugInfo::completeTemplateDefinition(
 
 /// getOrCreateType - Get the type from the cache or create a new
 /// one if necessary.
-llvm::MDType *CGDebugInfo::getOrCreateType(QualType Ty, llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::getOrCreateType(QualType Ty, llvm::DIFile *Unit) {
   if (Ty.isNull())
     return nullptr;
 
@@ -2060,7 +2059,7 @@ llvm::MDType *CGDebugInfo::getOrCreateType(QualType Ty, llvm::MDFile *Unit) {
     return T;
 
   // Otherwise create the type.
-  llvm::MDType *Res = CreateTypeNode(Ty, Unit);
+  llvm::DIType *Res = CreateTypeNode(Ty, Unit);
   void *TyPtr = Ty.getAsOpaquePtr();
 
   // And update the type cache.
@@ -2096,7 +2095,7 @@ ObjCInterfaceDecl *CGDebugInfo::getObjCInterfaceDecl(QualType Ty) {
 }
 
 /// CreateTypeNode - Create a new debug type node.
-llvm::MDType *CGDebugInfo::CreateTypeNode(QualType Ty, llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::CreateTypeNode(QualType Ty, llvm::DIFile *Unit) {
   // Handle qualifiers, which recursively handles what they refer to.
   if (Ty.hasLocalQualifiers())
     return CreateQualifiedType(Ty, Unit);
@@ -2178,11 +2177,11 @@ llvm::MDType *CGDebugInfo::CreateTypeNode(QualType Ty, llvm::MDFile *Unit) {
 
 /// getOrCreateLimitedType - Get the type from the cache or create a new
 /// limited type if necessary.
-llvm::MDType *CGDebugInfo::getOrCreateLimitedType(const RecordType *Ty,
-                                                  llvm::MDFile *Unit) {
+llvm::DIType *CGDebugInfo::getOrCreateLimitedType(const RecordType *Ty,
+                                                  llvm::DIFile *Unit) {
   QualType QTy(Ty, 0);
 
-  auto *T = cast_or_null<llvm::MDCompositeTypeBase>(getTypeOrNull(QTy));
+  auto *T = cast_or_null<llvm::DICompositeTypeBase>(getTypeOrNull(QTy));
 
   // We may have cached a forward decl when we could have created
   // a non-forward decl. Go ahead and create a non-forward decl
@@ -2191,12 +2190,12 @@ llvm::MDType *CGDebugInfo::getOrCreateLimitedType(const RecordType *Ty,
     return T;
 
   // Otherwise create the type.
-  llvm::MDCompositeType *Res = CreateLimitedType(Ty);
+  llvm::DICompositeType *Res = CreateLimitedType(Ty);
 
   // Propagate members from the declaration to the definition
   // CreateType(const RecordType*) will overwrite this with the members in the
   // correct order if the full type is needed.
-  DBuilder.replaceArrays(Res, T ? T->getElements() : llvm::DebugNodeArray());
+  DBuilder.replaceArrays(Res, T ? T->getElements() : llvm::DINodeArray());
 
   // And update the type cache.
   TypeCache[QTy.getAsOpaquePtr()].reset(Res);
@@ -2204,20 +2203,20 @@ llvm::MDType *CGDebugInfo::getOrCreateLimitedType(const RecordType *Ty,
 }
 
 // TODO: Currently used for context chains when limiting debug info.
-llvm::MDCompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) {
+llvm::DICompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) {
   RecordDecl *RD = Ty->getDecl();
 
   // Get overall information about the record type for the debug info.
-  llvm::MDFile *DefUnit = getOrCreateFile(RD->getLocation());
+  llvm::DIFile *DefUnit = getOrCreateFile(RD->getLocation());
   unsigned Line = getLineNumber(RD->getLocation());
   StringRef RDName = getClassName(RD);
 
-  llvm::MDScope *RDContext =
+  llvm::DIScope *RDContext =
       getContextDescriptor(cast<Decl>(RD->getDeclContext()));
 
   // If we ended up creating the type during the context chain construction,
   // just return that.
-  auto *T = cast_or_null<llvm::MDCompositeType>(
+  auto *T = cast_or_null<llvm::DICompositeType>(
       getTypeOrNull(CGM.getContext().getRecordType(RD)));
   if (T && (!T->isForwardDecl() || !RD->getDefinition()))
     return T;
@@ -2233,7 +2232,7 @@ llvm::MDCompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) {
 
   SmallString<256> FullName = getUniqueTagTypeName(Ty, CGM, TheCU);
 
-  llvm::MDCompositeType *RealDecl = DBuilder.createReplaceableCompositeType(
+  llvm::DICompositeType *RealDecl = DBuilder.createReplaceableCompositeType(
       getTagForRecord(RD), RDName, RDContext, DefUnit, Line, 0, Size, Align, 0,
       FullName);
 
@@ -2242,15 +2241,15 @@ llvm::MDCompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) {
 
   if (const ClassTemplateSpecializationDecl *TSpecial =
           dyn_cast<ClassTemplateSpecializationDecl>(RD))
-    DBuilder.replaceArrays(RealDecl, llvm::DebugNodeArray(),
+    DBuilder.replaceArrays(RealDecl, llvm::DINodeArray(),
                            CollectCXXTemplateParams(TSpecial, DefUnit));
   return RealDecl;
 }
 
 void CGDebugInfo::CollectContainingType(const CXXRecordDecl *RD,
-                                        llvm::MDCompositeType *RealDecl) {
+                                        llvm::DICompositeType *RealDecl) {
   // A class's primary base or the class itself contains the vtable.
-  llvm::MDCompositeType *ContainingType = nullptr;
+  llvm::DICompositeType *ContainingType = nullptr;
   const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);
   if (const CXXRecordDecl *PBase = RL.getPrimaryBase()) {
     // Seek non-virtual primary base root.
@@ -2262,7 +2261,7 @@ void CGDebugInfo::CollectContainingType(const CXXRecordDecl *RD,
       else
         break;
     }
-    ContainingType = cast<llvm::MDCompositeType>(
+    ContainingType = cast<llvm::DICompositeType>(
         getOrCreateType(QualType(PBase->getTypeForDecl(), 0),
                         getOrCreateFile(RD->getLocation())));
   } else if (RD->isDynamicClass())
@@ -2272,29 +2271,29 @@ void CGDebugInfo::CollectContainingType(const CXXRecordDecl *RD,
 }
 
 /// CreateMemberType - Create new member and increase Offset by FType's size.
-llvm::MDType *CGDebugInfo::CreateMemberType(llvm::MDFile *Unit, QualType FType,
+llvm::DIType *CGDebugInfo::CreateMemberType(llvm::DIFile *Unit, QualType FType,
                                             StringRef Name, uint64_t *Offset) {
-  llvm::MDType *FieldTy = CGDebugInfo::getOrCreateType(FType, Unit);
+  llvm::DIType *FieldTy = CGDebugInfo::getOrCreateType(FType, Unit);
   uint64_t FieldSize = CGM.getContext().getTypeSize(FType);
   unsigned FieldAlign = CGM.getContext().getTypeAlign(FType);
-  llvm::MDType *Ty = DBuilder.createMemberType(Unit, Name, Unit, 0, FieldSize,
+  llvm::DIType *Ty = DBuilder.createMemberType(Unit, Name, Unit, 0, FieldSize,
                                                FieldAlign, *Offset, 0, FieldTy);
   *Offset += FieldSize;
   return Ty;
 }
 
-void CGDebugInfo::collectFunctionDeclProps(GlobalDecl GD, llvm::MDFile *Unit,
+void CGDebugInfo::collectFunctionDeclProps(GlobalDecl GD, llvm::DIFile *Unit,
                                            StringRef &Name,
                                            StringRef &LinkageName,
-                                           llvm::MDScope *&FDContext,
-                                           llvm::DebugNodeArray &TParamsArray,
+                                           llvm::DIScope *&FDContext,
+                                           llvm::DINodeArray &TParamsArray,
                                            unsigned &Flags) {
   const FunctionDecl *FD = cast<FunctionDecl>(GD.getDecl());
   Name = getFunctionName(FD);
   // Use mangled name as linkage name for C/C++ functions.
   if (FD->hasPrototype()) {
     LinkageName = CGM.getMangledName(GD);
-    Flags |= llvm::DebugNode::FlagPrototyped;
+    Flags |= llvm::DINode::FlagPrototyped;
   }
   // No need to replicate the linkage name if it isn't different from the
   // subprogram name, no need to have it at all unless coverage is enabled or
@@ -2317,10 +2316,10 @@ void CGDebugInfo::collectFunctionDeclProps(GlobalDecl GD, llvm::MDFile *Unit,
   }
 }
 
-void CGDebugInfo::collectVarDeclProps(const VarDecl *VD, llvm::MDFile *&Unit,
+void CGDebugInfo::collectVarDeclProps(const VarDecl *VD, llvm::DIFile *&Unit,
                                       unsigned &LineNo, QualType &T,
                                       StringRef &Name, StringRef &LinkageName,
-                                      llvm::MDScope *&VDContext) {
+                                      llvm::DIScope *&VDContext) {
   Unit = getOrCreateFile(VD->getLocation());
   LineNo = getLineNumber(VD->getLocation());
 
@@ -2362,14 +2361,14 @@ void CGDebugInfo::collectVarDeclProps(const VarDecl *VD, llvm::MDFile *&Unit,
   VDContext = getContextDescriptor(dyn_cast<Decl>(DC));
 }
 
-llvm::MDSubprogram *
+llvm::DISubprogram *
 CGDebugInfo::getFunctionForwardDeclaration(const FunctionDecl *FD) {
-  llvm::DebugNodeArray TParamsArray;
+  llvm::DINodeArray TParamsArray;
   StringRef Name, LinkageName;
   unsigned Flags = 0;
   SourceLocation Loc = FD->getLocation();
-  llvm::MDFile *Unit = getOrCreateFile(Loc);
-  llvm::MDScope *DContext = Unit;
+  llvm::DIFile *Unit = getOrCreateFile(Loc);
+  llvm::DIScope *DContext = Unit;
   unsigned Line = getLineNumber(Loc);
 
   collectFunctionDeclProps(FD, Unit, Name, LinkageName, DContext,
@@ -2381,7 +2380,7 @@ CGDebugInfo::getFunctionForwardDeclaration(const FunctionDecl *FD) {
   QualType FnType =
     CGM.getContext().getFunctionType(FD->getReturnType(), ArgTypes,
                                      FunctionProtoType::ExtProtoInfo());
-  llvm::MDSubprogram *SP = DBuilder.createTempFunctionFwdDecl(
+  llvm::DISubprogram *SP = DBuilder.createTempFunctionFwdDecl(
       DContext, Name, LinkageName, Unit, Line,
       getOrCreateFunctionType(FD, FnType, Unit), !FD->isExternallyVisible(),
       false /*declaration*/, 0, Flags, CGM.getLangOpts().Optimize, nullptr,
@@ -2393,13 +2392,13 @@ CGDebugInfo::getFunctionForwardDeclaration(const FunctionDecl *FD) {
   return SP;
 }
 
-llvm::MDGlobalVariable *
+llvm::DIGlobalVariable *
 CGDebugInfo::getGlobalVariableForwardDeclaration(const VarDecl *VD) {
   QualType T;
   StringRef Name, LinkageName;
   SourceLocation Loc = VD->getLocation();
-  llvm::MDFile *Unit = getOrCreateFile(Loc);
-  llvm::MDScope *DContext = Unit;
+  llvm::DIFile *Unit = getOrCreateFile(Loc);
+  llvm::DIScope *DContext = Unit;
   unsigned Line = getLineNumber(Loc);
 
   collectVarDeclProps(VD, Unit, Line, T, Name, LinkageName, DContext);
@@ -2413,7 +2412,7 @@ CGDebugInfo::getGlobalVariableForwardDeclaration(const VarDecl *VD) {
   return GV;
 }
 
-llvm::DebugNode *CGDebugInfo::getDeclarationOrDefinition(const Decl *D) {
+llvm::DINode *CGDebugInfo::getDeclarationOrDefinition(const Decl *D) {
   // We only need a declaration (not a definition) of the type - so use whatever
   // we would otherwise do to get a type for a pointee. (forward declarations in
   // limited debug info, full definitions (if the type definition is available)
@@ -2424,7 +2423,7 @@ llvm::DebugNode *CGDebugInfo::getDeclarationOrDefinition(const Decl *D) {
   auto I = DeclCache.find(D->getCanonicalDecl());
 
   if (I != DeclCache.end())
-    return dyn_cast_or_null<llvm::DebugNode>(I->second);
+    return dyn_cast_or_null<llvm::DINode>(I->second);
 
   // No definition for now. Emit a forward definition that might be
   // merged with a potential upcoming definition.
@@ -2438,7 +2437,7 @@ llvm::DebugNode *CGDebugInfo::getDeclarationOrDefinition(const Decl *D) {
 
 /// getFunctionDeclaration - Return debug info descriptor to describe method
 /// declaration for the given method definition.
-llvm::MDSubprogram *CGDebugInfo::getFunctionDeclaration(const Decl *D) {
+llvm::DISubprogram *CGDebugInfo::getFunctionDeclaration(const Decl *D) {
   if (!D || DebugKind <= CodeGenOptions::DebugLineTablesOnly)
     return nullptr;
 
@@ -2454,11 +2453,11 @@ llvm::MDSubprogram *CGDebugInfo::getFunctionDeclaration(const Decl *D) {
     if (const CXXMethodDecl *MD =
             dyn_cast<CXXMethodDecl>(FD->getCanonicalDecl())) {
       return CreateCXXMemberFunction(MD, getOrCreateFile(MD->getLocation()),
-                                     cast<llvm::MDCompositeType>(S));
+                                     cast<llvm::DICompositeType>(S));
     }
   }
   if (MI != SPCache.end()) {
-    auto *SP = dyn_cast_or_null<llvm::MDSubprogram>(MI->second);
+    auto *SP = dyn_cast_or_null<llvm::DISubprogram>(MI->second);
     if (SP && !SP->isDefinition())
       return SP;
   }
@@ -2466,7 +2465,7 @@ llvm::MDSubprogram *CGDebugInfo::getFunctionDeclaration(const Decl *D) {
   for (auto NextFD : FD->redecls()) {
     auto MI = SPCache.find(NextFD->getCanonicalDecl());
     if (MI != SPCache.end()) {
-      auto *SP = dyn_cast_or_null<llvm::MDSubprogram>(MI->second);
+      auto *SP = dyn_cast_or_null<llvm::DISubprogram>(MI->second);
       if (SP && !SP->isDefinition())
         return SP;
     }
@@ -2476,9 +2475,9 @@ llvm::MDSubprogram *CGDebugInfo::getFunctionDeclaration(const Decl *D) {
 
 // getOrCreateFunctionType - Construct type. If it is a c++ method, include
 // implicit parameter "this".
-llvm::MDSubroutineType *CGDebugInfo::getOrCreateFunctionType(const Decl *D,
+llvm::DISubroutineType *CGDebugInfo::getOrCreateFunctionType(const Decl *D,
                                                              QualType FnType,
-                                                             llvm::MDFile *F) {
+                                                             llvm::DIFile *F) {
   if (!D || DebugKind <= CodeGenOptions::DebugLineTablesOnly)
     // Create fake but valid subroutine type. Otherwise -verify would fail, and
     // subprogram DIE will miss DW_AT_decl_file and DW_AT_decl_line fields.
@@ -2513,7 +2512,7 @@ llvm::MDSubroutineType *CGDebugInfo::getOrCreateFunctionType(const Decl *D,
     if (OMethod->isVariadic())
       Elts.push_back(DBuilder.createUnspecifiedParameter());
 
-    llvm::MDTypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(Elts);
+    llvm::DITypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(Elts);
     return DBuilder.createSubroutineType(F, EltTypeArray);
   }
 
@@ -2527,11 +2526,11 @@ llvm::MDSubroutineType *CGDebugInfo::getOrCreateFunctionType(const Decl *D,
         for (unsigned i = 0, e = FPT->getNumParams(); i != e; ++i)
           EltTys.push_back(getOrCreateType(FPT->getParamType(i), F));
       EltTys.push_back(DBuilder.createUnspecifiedParameter());
-      llvm::MDTypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(EltTys);
+      llvm::DITypeRefArray EltTypeArray = DBuilder.getOrCreateTypeArray(EltTys);
       return DBuilder.createSubroutineType(F, EltTypeArray);
     }
 
-  return cast<llvm::MDSubroutineType>(getOrCreateType(FnType, F));
+  return cast<llvm::DISubroutineType>(getOrCreateType(FnType, F));
 }
 
 /// EmitFunctionStart - Constructs the debug code for entering a function.
@@ -2548,9 +2547,9 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
   bool HasDecl = (D != nullptr);
 
   unsigned Flags = 0;
-  llvm::MDFile *Unit = getOrCreateFile(Loc);
-  llvm::MDScope *FDContext = Unit;
-  llvm::DebugNodeArray TParamsArray;
+  llvm::DIFile *Unit = getOrCreateFile(Loc);
+  llvm::DIScope *FDContext = Unit;
+  llvm::DINodeArray TParamsArray;
   if (!HasDecl) {
     // Use llvm function name.
     LinkageName = Fn->getName();
@@ -2558,7 +2557,7 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
     // If there is a subprogram for this function available then use it.
     auto FI = SPCache.find(FD->getCanonicalDecl());
     if (FI != SPCache.end()) {
-      auto *SP = dyn_cast_or_null<llvm::MDSubprogram>(FI->second);
+      auto *SP = dyn_cast_or_null<llvm::DISubprogram>(FI->second);
       if (SP && SP->isDefinition()) {
         LexicalBlockStack.emplace_back(SP);
         RegionMap[D].reset(SP);
@@ -2569,17 +2568,17 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
                              TParamsArray, Flags);
   } else if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D)) {
     Name = getObjCMethodName(OMD);
-    Flags |= llvm::DebugNode::FlagPrototyped;
+    Flags |= llvm::DINode::FlagPrototyped;
   } else {
     // Use llvm function name.
     Name = Fn->getName();
-    Flags |= llvm::DebugNode::FlagPrototyped;
+    Flags |= llvm::DINode::FlagPrototyped;
   }
   if (!Name.empty() && Name[0] == '\01')
     Name = Name.substr(1);
 
   if (!HasDecl || D->isImplicit()) {
-    Flags |= llvm::DebugNode::FlagArtificial;
+    Flags |= llvm::DINode::FlagArtificial;
     // Artificial functions without a location should not silently reuse CurLoc.
     if (Loc.isInvalid())
       CurLoc = SourceLocation();
@@ -2592,7 +2591,7 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
   // FunctionDecls. When/if we fix this we can have FDContext be TheCU/null for
   // all subprograms instead of the actual context since subprogram definitions
   // are emitted as CU level entities by the backend.
-  llvm::MDSubprogram *SP = DBuilder.createFunction(
+  llvm::DISubprogram *SP = DBuilder.createFunction(
       FDContext, Name, LinkageName, Unit, LineNo,
       getOrCreateFunctionType(D, FnType, Unit), Fn->hasInternalLinkage(),
       true /*definition*/, ScopeLine, Flags, CGM.getLangOpts().Optimize, Fn,
@@ -2632,7 +2631,7 @@ void CGDebugInfo::CreateLexicalBlock(SourceLocation Loc) {
   if (!LexicalBlockStack.empty())
     Back = LexicalBlockStack.back().get();
   LexicalBlockStack.emplace_back(DBuilder.createLexicalBlock(
-      cast<llvm::MDScope>(Back), getOrCreateFile(CurLoc), getLineNumber(CurLoc),
+      cast<llvm::DIScope>(Back), getOrCreateFile(CurLoc), getLineNumber(CurLoc),
       getColumnNumber(CurLoc)));
 }
 
@@ -2686,7 +2685,7 @@ void CGDebugInfo::EmitFunctionEnd(CGBuilderTy &Builder) {
 
 // EmitTypeForVarWithBlocksAttr - Build up structure info for the byref.
 // See BuildByRefType.
-llvm::MDType *CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD,
+llvm::DIType *CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD,
                                                         uint64_t *XOffset) {
 
   SmallVector<llvm::Metadata *, 5> EltTys;
@@ -2694,7 +2693,7 @@ llvm::MDType *CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD,
   uint64_t FieldSize, FieldOffset;
   unsigned FieldAlign;
 
-  llvm::MDFile *Unit = getOrCreateFile(VD->getLocation());
+  llvm::DIFile *Unit = getOrCreateFile(VD->getLocation());
   QualType Type = VD->getType();
 
   FieldOffset = 0;
@@ -2741,7 +2740,7 @@ llvm::MDType *CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD,
   }
 
   FType = Type;
-  llvm::MDType *FieldTy = getOrCreateType(FType, Unit);
+  llvm::DIType *FieldTy = getOrCreateType(FType, Unit);
   FieldSize = CGM.getContext().getTypeSize(FType);
   FieldAlign = CGM.getContext().toBits(Align);
 
@@ -2751,9 +2750,9 @@ llvm::MDType *CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD,
   EltTys.push_back(FieldTy);
   FieldOffset += FieldSize;
 
-  llvm::DebugNodeArray Elements = DBuilder.getOrCreateArray(EltTys);
+  llvm::DINodeArray Elements = DBuilder.getOrCreateArray(EltTys);
 
-  unsigned Flags = llvm::DebugNode::FlagBlockByrefStruct;
+  unsigned Flags = llvm::DINode::FlagBlockByrefStruct;
 
   return DBuilder.createStructType(Unit, "", Unit, 0, FieldOffset, 0, Flags,
                                    nullptr, Elements);
@@ -2769,10 +2768,10 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, llvm::dwarf::Tag Tag,
   bool Unwritten =
       VD->isImplicit() || (isa<Decl>(VD->getDeclContext()) &&
                            cast<Decl>(VD->getDeclContext())->isImplicit());
-  llvm::MDFile *Unit = nullptr;
+  llvm::DIFile *Unit = nullptr;
   if (!Unwritten)
     Unit = getOrCreateFile(VD->getLocation());
-  llvm::MDType *Ty;
+  llvm::DIType *Ty;
   uint64_t XOffset = 0;
   if (VD->hasAttr<BlocksAttr>())
     Ty = EmitTypeForVarWithBlocksAttr(VD, &XOffset);
@@ -2794,20 +2793,20 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, llvm::dwarf::Tag Tag,
   SmallVector<int64_t, 9> Expr;
   unsigned Flags = 0;
   if (VD->isImplicit())
-    Flags |= llvm::DebugNode::FlagArtificial;
+    Flags |= llvm::DINode::FlagArtificial;
   // If this is the first argument and it is implicit then
   // give it an object pointer flag.
   // FIXME: There has to be a better way to do this, but for static
   // functions there won't be an implicit param at arg1 and
   // otherwise it is 'self' or 'this'.
   if (isa<ImplicitParamDecl>(VD) && ArgNo == 1)
-    Flags |= llvm::DebugNode::FlagObjectPointer;
+    Flags |= llvm::DINode::FlagObjectPointer;
   if (llvm::Argument *Arg = dyn_cast<llvm::Argument>(Storage))
     if (Arg->getType()->isPointerTy() && !Arg->hasByValAttr() &&
         !VD->getType()->isPointerType())
       Expr.push_back(llvm::dwarf::DW_OP_deref);
 
-  auto *Scope = cast<llvm::MDScope>(LexicalBlockStack.back());
+  auto *Scope = cast<llvm::DIScope>(LexicalBlockStack.back());
 
   StringRef Name = VD->getName();
   if (!Name.empty()) {
@@ -2841,7 +2840,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, llvm::dwarf::Tag Tag,
     const RecordDecl *RD = cast<RecordDecl>(RT->getDecl());
     if (RD->isUnion() && RD->isAnonymousStructOrUnion()) {
       for (const auto *Field : RD->fields()) {
-        llvm::MDType *FieldTy = getOrCreateType(Field->getType(), Unit);
+        llvm::DIType *FieldTy = getOrCreateType(Field->getType(), Unit);
         StringRef FieldName = Field->getName();
 
         // Ignore unnamed fields. Do not ignore unnamed records.
@@ -2886,9 +2885,9 @@ void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *VD,
 /// never happen though, since creating a type for the implicit self
 /// argument implies that we already parsed the interface definition
 /// and the ivar declarations in the implementation.
-llvm::MDType *CGDebugInfo::CreateSelfType(const QualType &QualTy,
-                                          llvm::MDType *Ty) {
-  llvm::MDType *CachedTy = getTypeOrNull(QualTy);
+llvm::DIType *CGDebugInfo::CreateSelfType(const QualType &QualTy,
+                                          llvm::DIType *Ty) {
+  llvm::DIType *CachedTy = getTypeOrNull(QualTy);
   if (CachedTy)
     Ty = CachedTy;
   return DBuilder.createObjectPointerType(Ty);
@@ -2906,8 +2905,8 @@ void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(
   bool isByRef = VD->hasAttr<BlocksAttr>();
 
   uint64_t XOffset = 0;
-  llvm::MDFile *Unit = getOrCreateFile(VD->getLocation());
-  llvm::MDType *Ty;
+  llvm::DIFile *Unit = getOrCreateFile(VD->getLocation());
+  llvm::DIType *Ty;
   if (isByRef)
     Ty = EmitTypeForVarWithBlocksAttr(VD, &XOffset);
   else
@@ -2950,7 +2949,7 @@ void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(
   // Create the descriptor for the variable.
   auto *D = DBuilder.createLocalVariable(
       llvm::dwarf::DW_TAG_auto_variable,
-      cast<llvm::MDLocalScope>(LexicalBlockStack.back()), VD->getName(), Unit,
+      cast<llvm::DILocalScope>(LexicalBlockStack.back()), VD->getName(), Unit,
       Line, Ty);
 
   // Insert an llvm.dbg.declare into the current block.
@@ -2993,7 +2992,7 @@ void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block,
 
   // Collect some general information about the block's location.
   SourceLocation loc = blockDecl->getCaretLocation();
-  llvm::MDFile *tunit = getOrCreateFile(loc);
+  llvm::DIFile *tunit = getOrCreateFile(loc);
   unsigned line = getLineNumber(loc);
   unsigned column = getColumnNumber(loc);
 
@@ -3076,7 +3075,7 @@ void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block,
     const VarDecl *variable = capture->getVariable();
     StringRef name = variable->getName();
 
-    llvm::MDType *fieldType;
+    llvm::DIType *fieldType;
     if (capture->isByRef()) {
       TypeInfo PtrInfo = C.getTypeInfo(C.VoidPtrTy);
 
@@ -3098,17 +3097,17 @@ void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block,
   llvm::raw_svector_ostream(typeName) << "__block_literal_"
                                       << CGM.getUniqueBlockCount();
 
-  llvm::DebugNodeArray fieldsArray = DBuilder.getOrCreateArray(fields);
+  llvm::DINodeArray fieldsArray = DBuilder.getOrCreateArray(fields);
 
-  llvm::MDType *type = DBuilder.createStructType(
+  llvm::DIType *type = DBuilder.createStructType(
       tunit, typeName.str(), tunit, line,
       CGM.getContext().toBits(block.BlockSize),
       CGM.getContext().toBits(block.BlockAlign), 0, nullptr, fieldsArray);
   type = DBuilder.createPointerType(type, CGM.PointerWidthInBits);
 
   // Get overall information about the block.
-  unsigned flags = llvm::DebugNode::FlagArtificial;
-  auto *scope = cast<llvm::MDLocalScope>(LexicalBlockStack.back());
+  unsigned flags = llvm::DINode::FlagArtificial;
+  auto *scope = cast<llvm::DILocalScope>(LexicalBlockStack.back());
 
   // Create the descriptor for the parameter.
   auto *debugVar = DBuilder.createLocalVariable(
@@ -3130,7 +3129,7 @@ void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block,
 
 /// If D is an out-of-class definition of a static data member of a class, find
 /// its corresponding in-class declaration.
-llvm::MDDerivedType *
+llvm::DIDerivedType *
 CGDebugInfo::getOrCreateStaticDataMemberDeclarationOrNull(const VarDecl *D) {
   if (!D->isStaticDataMember())
     return nullptr;
@@ -3138,27 +3137,27 @@ CGDebugInfo::getOrCreateStaticDataMemberDeclarationOrNull(const VarDecl *D) {
   auto MI = StaticDataMemberCache.find(D->getCanonicalDecl());
   if (MI != StaticDataMemberCache.end()) {
     assert(MI->second && "Static data member declaration should still exist");
-    return cast<llvm::MDDerivedType>(MI->second);
+    return cast<llvm::DIDerivedType>(MI->second);
   }
 
   // If the member wasn't found in the cache, lazily construct and add it to the
   // type (used when a limited form of the type is emitted).
   auto DC = D->getDeclContext();
   auto *Ctxt =
-      cast<llvm::MDCompositeType>(getContextDescriptor(cast<Decl>(DC)));
+      cast<llvm::DICompositeType>(getContextDescriptor(cast<Decl>(DC)));
   return CreateRecordStaticField(D, Ctxt, cast<RecordDecl>(DC));
 }
 
 /// Recursively collect all of the member fields of a global anonymous decl and
 /// create static variables for them. The first time this is called it needs
 /// to be on a union and then from there we can have additional unnamed fields.
-llvm::MDGlobalVariable *CGDebugInfo::CollectAnonRecordDecls(
-    const RecordDecl *RD, llvm::MDFile *Unit, unsigned LineNo,
-    StringRef LinkageName, llvm::GlobalVariable *Var, llvm::MDScope *DContext) {
-  llvm::MDGlobalVariable *GV = nullptr;
+llvm::DIGlobalVariable *CGDebugInfo::CollectAnonRecordDecls(
+    const RecordDecl *RD, llvm::DIFile *Unit, unsigned LineNo,
+    StringRef LinkageName, llvm::GlobalVariable *Var, llvm::DIScope *DContext) {
+  llvm::DIGlobalVariable *GV = nullptr;
 
   for (const auto *Field : RD->fields()) {
-    llvm::MDType *FieldTy = getOrCreateType(Field->getType(), Unit);
+    llvm::DIType *FieldTy = getOrCreateType(Field->getType(), Unit);
     StringRef FieldName = Field->getName();
 
     // Ignore unnamed fields, but recurse into anonymous records.
@@ -3182,8 +3181,8 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
                                      const VarDecl *D) {
   assert(DebugKind >= CodeGenOptions::LimitedDebugInfo);
   // Create global variable debug descriptor.
-  llvm::MDFile *Unit = nullptr;
-  llvm::MDScope *DContext = nullptr;
+  llvm::DIFile *Unit = nullptr;
+  llvm::DIScope *DContext = nullptr;
   unsigned LineNo;
   StringRef DeclName, LinkageName;
   QualType T;
@@ -3191,7 +3190,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
 
   // Attempt to store one global variable for the declaration - even if we
   // emit a lot of fields.
-  llvm::MDGlobalVariable *GV = nullptr;
+  llvm::DIGlobalVariable *GV = nullptr;
 
   // If this is an anonymous union then we'll want to emit a global
   // variable for each member of the anonymous union so that it's possible
@@ -3215,9 +3214,9 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD,
                                      llvm::Constant *Init) {
   assert(DebugKind >= CodeGenOptions::LimitedDebugInfo);
   // Create the descriptor for the variable.
-  llvm::MDFile *Unit = getOrCreateFile(VD->getLocation());
+  llvm::DIFile *Unit = getOrCreateFile(VD->getLocation());
   StringRef Name = VD->getName();
-  llvm::MDType *Ty = getOrCreateType(VD->getType(), Unit);
+  llvm::DIType *Ty = getOrCreateType(VD->getType(), Unit);
   if (const EnumConstantDecl *ECD = dyn_cast<EnumConstantDecl>(VD)) {
     const EnumDecl *ED = cast<EnumDecl>(ECD->getDeclContext());
     assert(isa<EnumType>(ED->getTypeForDecl()) && "Enum without EnumType?");
@@ -3242,7 +3241,7 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD,
     return;
   }
 
-  llvm::MDScope *DContext =
+  llvm::DIScope *DContext =
       getContextDescriptor(dyn_cast<Decl>(VD->getDeclContext()));
 
   auto &GV = DeclCache[VD];
@@ -3253,7 +3252,7 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD,
       true, Init, getOrCreateStaticDataMemberDeclarationOrNull(VarD)));
 }
 
-llvm::MDScope *CGDebugInfo::getCurrentContextDescriptor(const Decl *D) {
+llvm::DIScope *CGDebugInfo::getCurrentContextDescriptor(const Decl *D) {
   if (!LexicalBlockStack.empty())
     return LexicalBlockStack.back();
   return getContextDescriptor(D);
@@ -3276,21 +3275,21 @@ void CGDebugInfo::EmitUsingDecl(const UsingDecl &UD) {
   // Emitting one decl is sufficient - debuggers can detect that this is an
   // overloaded name & provide lookup for all the overloads.
   const UsingShadowDecl &USD = **UD.shadow_begin();
-  if (llvm::DebugNode *Target =
+  if (llvm::DINode *Target =
           getDeclarationOrDefinition(USD.getUnderlyingDecl()))
     DBuilder.createImportedDeclaration(
         getCurrentContextDescriptor(cast<Decl>(USD.getDeclContext())), Target,
         getLineNumber(USD.getLocation()));
 }
 
-llvm::MDImportedEntity *
+llvm::DIImportedEntity *
 CGDebugInfo::EmitNamespaceAlias(const NamespaceAliasDecl &NA) {
   if (CGM.getCodeGenOpts().getDebugInfo() < CodeGenOptions::LimitedDebugInfo)
     return nullptr;
   auto &VH = NamespaceAliasCache[&NA];
   if (VH)
-    return cast<llvm::MDImportedEntity>(VH);
-  llvm::MDImportedEntity *R;
+    return cast<llvm::DIImportedEntity>(VH);
+  llvm::DIImportedEntity *R;
   if (const NamespaceAliasDecl *Underlying =
           dyn_cast<NamespaceAliasDecl>(NA.getAliasedNamespace()))
     // This could cache & dedup here rather than relying on metadata deduping.
@@ -3309,18 +3308,18 @@ CGDebugInfo::EmitNamespaceAlias(const NamespaceAliasDecl &NA) {
 
 /// getOrCreateNamesSpace - Return namespace descriptor for the given
 /// namespace decl.
-llvm::MDNamespace *
+llvm::DINamespace *
 CGDebugInfo::getOrCreateNameSpace(const NamespaceDecl *NSDecl) {
   NSDecl = NSDecl->getCanonicalDecl();
   auto I = NameSpaceCache.find(NSDecl);
   if (I != NameSpaceCache.end())
-    return cast<llvm::MDNamespace>(I->second);
+    return cast<llvm::DINamespace>(I->second);
 
   unsigned LineNo = getLineNumber(NSDecl->getLocation());
-  llvm::MDFile *FileD = getOrCreateFile(NSDecl->getLocation());
-  llvm::MDScope *Context =
+  llvm::DIFile *FileD = getOrCreateFile(NSDecl->getLocation());
+  llvm::DIScope *Context =
       getContextDescriptor(dyn_cast<Decl>(NSDecl->getDeclContext()));
-  llvm::MDNamespace *NS =
+  llvm::DINamespace *NS =
       DBuilder.createNameSpace(Context, NSDecl->getName(), FileD, LineNo);
   NameSpaceCache[NSDecl].reset(NS);
   return NS;
@@ -3331,23 +3330,23 @@ void CGDebugInfo::finalize() {
   // element and the size(), so don't cache/reference them.
   for (size_t i = 0; i != ObjCInterfaceCache.size(); ++i) {
     ObjCInterfaceCacheEntry E = ObjCInterfaceCache[i];
-    llvm::MDType *Ty = E.Type->getDecl()->getDefinition()
+    llvm::DIType *Ty = E.Type->getDecl()->getDefinition()
                            ? CreateTypeDefinition(E.Type, E.Unit)
                            : E.Decl;
-    DBuilder.replaceTemporary(llvm::TempMDType(E.Decl), Ty);
+    DBuilder.replaceTemporary(llvm::TempDIType(E.Decl), Ty);
   }
 
   for (auto p : ReplaceMap) {
     assert(p.second);
-    auto *Ty = cast<llvm::MDType>(p.second);
+    auto *Ty = cast<llvm::DIType>(p.second);
     assert(Ty->isForwardDecl());
 
     auto it = TypeCache.find(p.first);
     assert(it != TypeCache.end());
     assert(it->second);
 
-    DBuilder.replaceTemporary(llvm::TempMDType(Ty),
-                               cast<llvm::MDType>(it->second));
+    DBuilder.replaceTemporary(llvm::TempDIType(Ty),
+                              cast<llvm::DIType>(it->second));
   }
 
   for (const auto &p : FwdDeclReplaceMap) {
@@ -3371,7 +3370,7 @@ void CGDebugInfo::finalize() {
   // up the final type in the type cache.
   for (std::vector<void *>::const_iterator RI = RetainedTypes.begin(),
          RE = RetainedTypes.end(); RI != RE; ++RI)
-    DBuilder.retainType(cast<llvm::MDType>(TypeCache[*RI]));
+    DBuilder.retainType(cast<llvm::DIType>(TypeCache[*RI]));
 
   DBuilder.finalize();
 }
index 19d8c7bdbbda13f97e7bd8f1e73de15c6821de6f..8509e0770db6b9a635b7a07edf47eeb52fc6ab23 100644 (file)
@@ -52,30 +52,30 @@ class CGDebugInfo {
   CodeGenModule &CGM;
   const CodeGenOptions::DebugInfoKind DebugKind;
   llvm::DIBuilder DBuilder;
-  llvm::MDCompileUnit *TheCU = nullptr;
+  llvm::DICompileUnit *TheCU = nullptr;
   SourceLocation CurLoc;
-  llvm::MDType *VTablePtrType = nullptr;
-  llvm::MDType *ClassTy = nullptr;
-  llvm::MDCompositeType *ObjTy = nullptr;
-  llvm::MDType *SelTy = nullptr;
-  llvm::MDType *OCLImage1dDITy = nullptr;
-  llvm::MDType *OCLImage1dArrayDITy = nullptr;
-  llvm::MDType *OCLImage1dBufferDITy = nullptr;
-  llvm::MDType *OCLImage2dDITy = nullptr;
-  llvm::MDType *OCLImage2dArrayDITy = nullptr;
-  llvm::MDType *OCLImage3dDITy = nullptr;
-  llvm::MDType *OCLEventDITy = nullptr;
-  llvm::MDType *BlockLiteralGeneric = nullptr;
+  llvm::DIType *VTablePtrType = nullptr;
+  llvm::DIType *ClassTy = nullptr;
+  llvm::DICompositeType *ObjTy = nullptr;
+  llvm::DIType *SelTy = nullptr;
+  llvm::DIType *OCLImage1dDITy = nullptr;
+  llvm::DIType *OCLImage1dArrayDITy = nullptr;
+  llvm::DIType *OCLImage1dBufferDITy = nullptr;
+  llvm::DIType *OCLImage2dDITy = nullptr;
+  llvm::DIType *OCLImage2dArrayDITy = nullptr;
+  llvm::DIType *OCLImage3dDITy = nullptr;
+  llvm::DIType *OCLEventDITy = nullptr;
+  llvm::DIType *BlockLiteralGeneric = nullptr;
 
   /// \brief Cache of previously constructed Types.
   llvm::DenseMap<const void *, llvm::TrackingMDRef> TypeCache;
 
   struct ObjCInterfaceCacheEntry {
     const ObjCInterfaceType *Type;
-    llvm::MDType *Decl;
-    llvm::MDFile *Unit;
-    ObjCInterfaceCacheEntry(const ObjCInterfaceType *Type, llvm::MDType *Decl,
-                            llvm::MDFile *Unit)
+    llvm::DIType *Decl;
+    llvm::DIFile *Unit;
+    ObjCInterfaceCacheEntry(const ObjCInterfaceType *Type, llvm::DIType *Decl,
+                            llvm::DIFile *Unit)
         : Type(Type), Decl(Decl), Unit(Unit) {}
   };
 
@@ -96,7 +96,7 @@ class CGDebugInfo {
       FwdDeclReplaceMap;
 
   // LexicalBlockStack - Keep track of our current nested lexical block.
-  std::vector<llvm::TypedTrackingMDRef<llvm::MDScope>> LexicalBlockStack;
+  std::vector<llvm::TypedTrackingMDRef<llvm::DIScope>> LexicalBlockStack;
   llvm::DenseMap<const Decl *, llvm::TrackingMDRef> RegionMap;
   // FnBeginRegionCount - Keep track of LexicalBlockStack counter at the
   // beginning of a function. This is used to pop unbalanced regions at
@@ -120,94 +120,94 @@ class CGDebugInfo {
 
   /// Helper functions for getOrCreateType.
   unsigned Checksum(const ObjCInterfaceDecl *InterfaceDecl);
-  llvm::MDType *CreateType(const BuiltinType *Ty);
-  llvm::MDType *CreateType(const ComplexType *Ty);
-  llvm::MDType *CreateQualifiedType(QualType Ty, llvm::MDFile *Fg);
-  llvm::MDType *CreateType(const TypedefType *Ty, llvm::MDFile *Fg);
-  llvm::MDType *CreateType(const TemplateSpecializationType *Ty,
-                           llvm::MDFile *Fg);
-  llvm::MDType *CreateType(const ObjCObjectPointerType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const PointerType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const BlockPointerType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const FunctionType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const RecordType *Tyg);
-  llvm::MDType *CreateTypeDefinition(const RecordType *Ty);
-  llvm::MDCompositeType *CreateLimitedType(const RecordType *Ty);
+  llvm::DIType *CreateType(const BuiltinType *Ty);
+  llvm::DIType *CreateType(const ComplexType *Ty);
+  llvm::DIType *CreateQualifiedType(QualType Ty, llvm::DIFile *Fg);
+  llvm::DIType *CreateType(const TypedefType *Ty, llvm::DIFile *Fg);
+  llvm::DIType *CreateType(const TemplateSpecializationType *Ty,
+                           llvm::DIFile *Fg);
+  llvm::DIType *CreateType(const ObjCObjectPointerType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const PointerType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const BlockPointerType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const FunctionType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const RecordType *Tyg);
+  llvm::DIType *CreateTypeDefinition(const RecordType *Ty);
+  llvm::DICompositeType *CreateLimitedType(const RecordType *Ty);
   void CollectContainingType(const CXXRecordDecl *RD,
-                             llvm::MDCompositeType *CT);
-  llvm::MDType *CreateType(const ObjCInterfaceType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateTypeDefinition(const ObjCInterfaceType *Ty,
-                                     llvm::MDFile *F);
-  llvm::MDType *CreateType(const ObjCObjectType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const VectorType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const ArrayType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const LValueReferenceType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const RValueReferenceType *Ty, llvm::MDFile *Unit);
-  llvm::MDType *CreateType(const MemberPointerType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateType(const AtomicType *Ty, llvm::MDFile *F);
-  llvm::MDType *CreateEnumType(const EnumType *Ty);
-  llvm::MDType *CreateTypeDefinition(const EnumType *Ty);
-  llvm::MDType *CreateSelfType(const QualType &QualTy, llvm::MDType *Ty);
-  llvm::MDType *getTypeOrNull(const QualType);
-  llvm::MDSubroutineType *getOrCreateMethodType(const CXXMethodDecl *Method,
-                                                llvm::MDFile *F);
-  llvm::MDSubroutineType *
+                             llvm::DICompositeType *CT);
+  llvm::DIType *CreateType(const ObjCInterfaceType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateTypeDefinition(const ObjCInterfaceType *Ty,
+                                     llvm::DIFile *F);
+  llvm::DIType *CreateType(const ObjCObjectType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const VectorType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const ArrayType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const LValueReferenceType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const RValueReferenceType *Ty, llvm::DIFile *Unit);
+  llvm::DIType *CreateType(const MemberPointerType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateType(const AtomicType *Ty, llvm::DIFile *F);
+  llvm::DIType *CreateEnumType(const EnumType *Ty);
+  llvm::DIType *CreateTypeDefinition(const EnumType *Ty);
+  llvm::DIType *CreateSelfType(const QualType &QualTy, llvm::DIType *Ty);
+  llvm::DIType *getTypeOrNull(const QualType);
+  llvm::DISubroutineType *getOrCreateMethodType(const CXXMethodDecl *Method,
+                                                llvm::DIFile *F);
+  llvm::DISubroutineType *
   getOrCreateInstanceMethodType(QualType ThisPtr, const FunctionProtoType *Func,
-                                llvm::MDFile *Unit);
-  llvm::MDSubroutineType *
-  getOrCreateFunctionType(const Decl *D, QualType FnType, llvm::MDFile *F);
-  llvm::MDType *getOrCreateVTablePtrType(llvm::MDFile *F);
-  llvm::MDNamespace *getOrCreateNameSpace(const NamespaceDecl *N);
-  llvm::MDType *getOrCreateTypeDeclaration(QualType PointeeTy, llvm::MDFile *F);
-  llvm::MDType *CreatePointerLikeType(llvm::dwarf::Tag Tag, const Type *Ty,
-                                      QualType PointeeTy, llvm::MDFile *F);
+                                llvm::DIFile *Unit);
+  llvm::DISubroutineType *
+  getOrCreateFunctionType(const Decl *D, QualType FnType, llvm::DIFile *F);
+  llvm::DIType *getOrCreateVTablePtrType(llvm::DIFile *F);
+  llvm::DINamespace *getOrCreateNameSpace(const NamespaceDecl *N);
+  llvm::DIType *getOrCreateTypeDeclaration(QualType PointeeTy, llvm::DIFile *F);
+  llvm::DIType *CreatePointerLikeType(llvm::dwarf::Tag Tag, const Type *Ty,
+                                      QualType PointeeTy, llvm::DIFile *F);
 
   llvm::Value *getCachedInterfaceTypeOrNull(const QualType Ty);
-  llvm::MDType *getOrCreateStructPtrType(StringRef Name, llvm::MDType *&Cache);
+  llvm::DIType *getOrCreateStructPtrType(StringRef Name, llvm::DIType *&Cache);
 
-  llvm::MDSubprogram *CreateCXXMemberFunction(const CXXMethodDecl *Method,
-                                              llvm::MDFile *F,
-                                              llvm::MDType *RecordTy);
+  llvm::DISubprogram *CreateCXXMemberFunction(const CXXMethodDecl *Method,
+                                              llvm::DIFile *F,
+                                              llvm::DIType *RecordTy);
 
-  void CollectCXXMemberFunctions(const CXXRecordDecl *Decl, llvm::MDFile *F,
+  void CollectCXXMemberFunctions(const CXXRecordDecl *Decl, llvm::DIFile *F,
                                  SmallVectorImpl<llvm::Metadata *> &E,
-                                 llvm::MDType *T);
+                                 llvm::DIType *T);
 
-  void CollectCXXBases(const CXXRecordDecl *Decl, llvm::MDFile *F,
+  void CollectCXXBases(const CXXRecordDecl *Decl, llvm::DIFile *F,
                        SmallVectorImpl<llvm::Metadata *> &EltTys,
-                       llvm::MDType *RecordTy);
-
-  llvm::DebugNodeArray
-  CollectTemplateParams(const TemplateParameterList *TPList,
-                        ArrayRef<TemplateArgument> TAList, llvm::MDFile *Unit);
-  llvm::DebugNodeArray CollectFunctionTemplateParams(const FunctionDecl *FD,
-                                                     llvm::MDFile *Unit);
-  llvm::DebugNodeArray
+                       llvm::DIType *RecordTy);
+
+  llvm::DINodeArray CollectTemplateParams(const TemplateParameterList *TPList,
+                                          ArrayRef<TemplateArgument> TAList,
+                                          llvm::DIFile *Unit);
+  llvm::DINodeArray CollectFunctionTemplateParams(const FunctionDecl *FD,
+                                                  llvm::DIFile *Unit);
+  llvm::DINodeArray
   CollectCXXTemplateParams(const ClassTemplateSpecializationDecl *TS,
-                           llvm::MDFile *F);
+                           llvm::DIFile *F);
 
-  llvm::MDType *createFieldType(StringRef name, QualType type,
+  llvm::DIType *createFieldType(StringRef name, QualType type,
                                 uint64_t sizeInBitsOverride, SourceLocation loc,
                                 AccessSpecifier AS, uint64_t offsetInBits,
-                                llvm::MDFile *tunit, llvm::MDScope *scope,
+                                llvm::DIFile *tunit, llvm::DIScope *scope,
                                 const RecordDecl *RD = nullptr);
 
   // Helpers for collecting fields of a record.
   void CollectRecordLambdaFields(const CXXRecordDecl *CXXDecl,
                                  SmallVectorImpl<llvm::Metadata *> &E,
-                                 llvm::MDType *RecordTy);
-  llvm::MDDerivedType *CreateRecordStaticField(const VarDecl *Var,
-                                               llvm::MDType *RecordTy,
+                                 llvm::DIType *RecordTy);
+  llvm::DIDerivedType *CreateRecordStaticField(const VarDecl *Var,
+                                               llvm::DIType *RecordTy,
                                                const RecordDecl *RD);
   void CollectRecordNormalField(const FieldDecl *Field, uint64_t OffsetInBits,
-                                llvm::MDFile *F,
+                                llvm::DIFile *F,
                                 SmallVectorImpl<llvm::Metadata *> &E,
-                                llvm::MDType *RecordTy, const RecordDecl *RD);
-  void CollectRecordFields(const RecordDecl *Decl, llvm::MDFile *F,
+                                llvm::DIType *RecordTy, const RecordDecl *RD);
+  void CollectRecordFields(const RecordDecl *Decl, llvm::DIFile *F,
                            SmallVectorImpl<llvm::Metadata *> &E,
-                           llvm::MDCompositeType *RecordTy);
+                           llvm::DICompositeType *RecordTy);
 
-  void CollectVTableInfo(const CXXRecordDecl *Decl, llvm::MDFile *F,
+  void CollectVTableInfo(const CXXRecordDecl *Decl, llvm::DIFile *F,
                          SmallVectorImpl<llvm::Metadata *> &EltTys);
 
   // CreateLexicalBlock - Create a new lexical block node and push it on
@@ -290,14 +290,14 @@ public:
   void EmitUsingDecl(const UsingDecl &UD);
 
   /// \brief Emit C++ namespace alias.
-  llvm::MDImportedEntity *EmitNamespaceAlias(const NamespaceAliasDecl &NA);
+  llvm::DIImportedEntity *EmitNamespaceAlias(const NamespaceAliasDecl &NA);
 
   /// \brief Emit record type's standalone debug info.
-  llvm::MDType *getOrCreateRecordType(QualType Ty, SourceLocation L);
+  llvm::DIType *getOrCreateRecordType(QualType Ty, SourceLocation L);
 
   /// \brief Emit an objective c interface type standalone
   /// debug info.
-  llvm::MDType *getOrCreateInterfaceType(QualType Ty, SourceLocation Loc);
+  llvm::DIType *getOrCreateInterfaceType(QualType Ty, SourceLocation Loc);
 
   void completeType(const EnumDecl *ED);
   void completeType(const RecordDecl *RD);
@@ -315,17 +315,17 @@ private:
 
   // EmitTypeForVarWithBlocksAttr - Build up structure info for the byref.
   // See BuildByRefType.
-  llvm::MDType *EmitTypeForVarWithBlocksAttr(const VarDecl *VD,
+  llvm::DIType *EmitTypeForVarWithBlocksAttr(const VarDecl *VD,
                                              uint64_t *OffSet);
 
   /// \brief Get context info for the decl.
-  llvm::MDScope *getContextDescriptor(const Decl *Decl);
+  llvm::DIScope *getContextDescriptor(const Decl *Decl);
 
-  llvm::MDScope *getCurrentContextDescriptor(const Decl *Decl);
+  llvm::DIScope *getCurrentContextDescriptor(const Decl *Decl);
 
   /// \brief Create a forward decl for a RecordType in a given context.
-  llvm::MDCompositeType *getOrCreateRecordFwdDecl(const RecordType *,
-                                                  llvm::MDScope *);
+  llvm::DICompositeType *getOrCreateRecordFwdDecl(const RecordType *,
+                                                  llvm::DIScope *);
 
   /// \brief Return current directory name.
   StringRef getCurrentDirname();
@@ -335,58 +335,58 @@ private:
 
   /// \brief Get the file debug info descriptor for the input
   /// location.
-  llvm::MDFile *getOrCreateFile(SourceLocation Loc);
+  llvm::DIFile *getOrCreateFile(SourceLocation Loc);
 
   /// \brief Get the file info for main compile unit.
-  llvm::MDFile *getOrCreateMainFile();
+  llvm::DIFile *getOrCreateMainFile();
 
   /// \brief Get the type from the cache or create a new type if
   /// necessary.
-  llvm::MDType *getOrCreateType(QualType Ty, llvm::MDFile *Fg);
+  llvm::DIType *getOrCreateType(QualType Ty, llvm::DIFile *Fg);
 
   /// \brief Get the type from the cache or create a new
   /// partial type if necessary.
-  llvm::MDType *getOrCreateLimitedType(const RecordType *Ty, llvm::MDFile *F);
+  llvm::DIType *getOrCreateLimitedType(const RecordType *Ty, llvm::DIFile *F);
 
   /// \brief Create type metadata for a source language type.
-  llvm::MDType *CreateTypeNode(QualType Ty, llvm::MDFile *Fg);
+  llvm::DIType *CreateTypeNode(QualType Ty, llvm::DIFile *Fg);
 
   /// \brief return the underlying ObjCInterfaceDecl
   /// if Ty is an ObjCInterface or a pointer to one.
   ObjCInterfaceDecl* getObjCInterfaceDecl(QualType Ty);
 
   /// \brief Create new member and increase Offset by FType's size.
-  llvm::MDType *CreateMemberType(llvm::MDFile *Unit, QualType FType,
+  llvm::DIType *CreateMemberType(llvm::DIFile *Unit, QualType FType,
                                  StringRef Name, uint64_t *Offset);
 
   /// \brief Retrieve the DIDescriptor, if any, for the canonical form of this
   /// declaration.
-  llvm::DebugNode *getDeclarationOrDefinition(const Decl *D);
+  llvm::DINode *getDeclarationOrDefinition(const Decl *D);
 
   /// \brief Return debug info descriptor to describe method
   /// declaration for the given method definition.
-  llvm::MDSubprogram *getFunctionDeclaration(const Decl *D);
+  llvm::DISubprogram *getFunctionDeclaration(const Decl *D);
 
   /// Return debug info descriptor to describe in-class static data member
   /// declaration for the given out-of-class definition.
-  llvm::MDDerivedType *
+  llvm::DIDerivedType *
   getOrCreateStaticDataMemberDeclarationOrNull(const VarDecl *D);
 
   /// \brief Create a subprogram describing the forward
   /// decalration represented in the given FunctionDecl.
-  llvm::MDSubprogram *getFunctionForwardDeclaration(const FunctionDecl *FD);
+  llvm::DISubprogram *getFunctionForwardDeclaration(const FunctionDecl *FD);
 
   /// \brief Create a global variable describing the forward decalration
   /// represented in the given VarDecl.
-  llvm::MDGlobalVariable *
+  llvm::DIGlobalVariable *
   getGlobalVariableForwardDeclaration(const VarDecl *VD);
 
   /// Return a global variable that represents one of the collection of
   /// global variables created for an anonmyous union.
-  llvm::MDGlobalVariable *
-  CollectAnonRecordDecls(const RecordDecl *RD, llvm::MDFile *Unit,
+  llvm::DIGlobalVariable *
+  CollectAnonRecordDecls(const RecordDecl *RD, llvm::DIFile *Unit,
                          unsigned LineNo, StringRef LinkageName,
-                         llvm::GlobalVariable *Var, llvm::MDScope *DContext);
+                         llvm::GlobalVariable *Var, llvm::DIScope *DContext);
 
   /// \brief Get function name for the given FunctionDecl. If the
   /// name is constructed on demand (e.g. C++ destructor) then the name
@@ -418,16 +418,16 @@ private:
 
   /// \brief Collect various properties of a FunctionDecl.
   /// \param GD  A GlobalDecl whose getDecl() must return a FunctionDecl.
-  void collectFunctionDeclProps(GlobalDecl GD, llvm::MDFile *Unit,
+  void collectFunctionDeclProps(GlobalDecl GD, llvm::DIFile *Unit,
                                 StringRef &Name, StringRef &LinkageName,
-                                llvm::MDScope *&FDContext,
-                                llvm::DebugNodeArray &TParamsArray,
+                                llvm::DIScope *&FDContext,
+                                llvm::DINodeArray &TParamsArray,
                                 unsigned &Flags);
 
   /// \brief Collect various properties of a VarDecl.
-  void collectVarDeclProps(const VarDecl *VD, llvm::MDFile *&Unit,
+  void collectVarDeclProps(const VarDecl *VD, llvm::DIFile *&Unit,
                            unsigned &LineNo, QualType &T, StringRef &Name,
-                           StringRef &LinkageName, llvm::MDScope *&VDContext);
+                           StringRef &LinkageName, llvm::DIScope *&VDContext);
 
   /// \brief Allocate a copy of \p A using the DebugInfoNames allocator
   /// and return a reference to it. If multiple arguments are given the strings
index 44be13ab69b66b74c72a4e0fb8c155967494029d..080f02ea7ed4c123ff4b2a9caead79b6e78ea773 100644 (file)
@@ -6,11 +6,11 @@ int main() {
   return 0;
 }
 
-// CHECK: !MDGlobalVariable(name: "localstatic"
+// CHECK: !DIGlobalVariable(name: "localstatic"
 // CHECK-NOT:               linkageName:
 // CHECK-SAME:              line: 5,
 // CHECK-SAME:              variable: i32* @main.localstatic
-// CHECK: !MDGlobalVariable(name: "global"
+// CHECK: !DIGlobalVariable(name: "global"
 // CHECK-NOT:               linkageName:
 // CHECK-SAME:              line: 3,
 // CHECK-SAME:              variable: i32* @global
index 60302d690587c680a2d0dda1ff7c91e4599f70ca..273385a3a942bd069dedec8aaeecaae12177c7dc 100644 (file)
@@ -11,6 +11,6 @@ int main() {
        int j = foo(1);
        return 0;
 }
-// CHECK: !MDGlobalVariable(name: "b",
+// CHECK: !DIGlobalVariable(name: "b",
 // CHECK-NOT:               linkageName:
 // CHECK-SAME:              ){{$}}
index daae53d1c187ef13e5259b96d0ebc7bc552bc986..3c33bae8b19a2683daf677479c78f19101cf6b52 100644 (file)
@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 -emit-llvm -g < %s | FileCheck %s
 // Test to check number of lexical scope identified in debug info.
-// CHECK: !MDLexicalBlock(
-// CHECK: !MDLexicalBlock(
-// CHECK: !MDLexicalBlock(
-// CHECK: !MDLexicalBlock(
+// CHECK: !DILexicalBlock(
+// CHECK: !DILexicalBlock(
+// CHECK: !DILexicalBlock(
+// CHECK: !DILexicalBlock(
 
 extern int bar();
 extern void foobar();
index 3a98e4cf437ce57f84b7364b3261b0b8729bf3bd..a23250e7b70c9546e39add90a6424dafd0d46918 100644 (file)
@@ -1,3 +1,3 @@
 // RUN: %clang -emit-llvm -S -O0 -g %s -o - | FileCheck %s
-// CHECK: !MDGlobalVariable(
+// CHECK: !DIGlobalVariable(
 unsigned char ctable1[1] = { 0001 };
index bec7d84ed6f16239938d68dd2f674acf5ca3a898..007be7684ba36f43c966fe086b9eff83294fc881 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
-// CHECK: !MDLexicalBlock(
-// CHECK: !MDLexicalBlock(
+// CHECK: !DILexicalBlock(
+// CHECK: !DILexicalBlock(
 int foo(int i) {
        if (i) {
                int j = 2;
index 44c973acda674bdc17ff74e2908de30cefe47d4d..386c2c333acb5954d8fbf644c69b80409c0c513b 100644 (file)
@@ -6,5 +6,5 @@ void foo() {
   int p = 0;    // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]]
 }
 // Now match the line number records:
-// CHECK: {{^}}[[variable_l]] = !MDLocation(line: 5,
-// CHECK: {{^}}[[variable_p]] = !MDLocation(line: 6,
+// CHECK: {{^}}[[variable_l]] = !DILocation(line: 5,
+// CHECK: {{^}}[[variable_p]] = !DILocation(line: 6,
index e07a184f5962fd582a5c0db7507447994552e6e2..04956ae0f276a981f9d66990e6c7e8e6c42574db 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -S -emit-llvm -g  %s -o - | FileCheck %s
-// CHECK: !MDGlobalVariable(
+// CHECK: !DIGlobalVariable(
 
 static const unsigned int ro = 201;
 void bar(int);
index cc477e4ffb4d3812a307acc43ef7cbdf87e302a8..c6ffa6e9bfb996483bf9e440bb5fd6907a1ebc43 100644 (file)
@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 -x c++ -g -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s
 // PR23332
 
-// CHECK: MDLocalVariable(tag: DW_TAG_arg_variable, arg: 255
-// CHECK: MDLocalVariable(tag: DW_TAG_arg_variable, arg: 256
-// CHECK: MDLocalVariable(tag: DW_TAG_arg_variable, arg: 257
+// CHECK: DILocalVariable(tag: DW_TAG_arg_variable, arg: 255
+// CHECK: DILocalVariable(tag: DW_TAG_arg_variable, arg: 256
+// CHECK: DILocalVariable(tag: DW_TAG_arg_variable, arg: 257
 void fn1(int, int, int, int, int, int, int, int, int, int, int, int, int, int,
          int, int, int, int, int, int, int, int, int, int, int, int, int, int,
          int, int, int, int, int, int, int, int, int, int, int, int, int, int,
index 9389047c0e78e3d20f0c4254bf718ddf2b7f97a2..47c904b999512fecaab940f8e41f54845e423b17 100644 (file)
@@ -2,7 +2,7 @@
 
 int somefunc(char *x, int y, double z) {
   
-  // CHECK: !MDSubroutineType(types: ![[NUM:[0-9]+]])
+  // CHECK: !DISubroutineType(types: ![[NUM:[0-9]+]])
   // CHECK: ![[NUM]] = {{!{![^,]*, ![^,]*, ![^,]*, ![^,]*}}}
   
   return y;
index f3f5e6bd0a918f27c5f1b462c37fe86a36169f77..5476d8874bf49fbfd8ade71d73fc7fa73fa77d01 100644 (file)
@@ -9,8 +9,8 @@
 
 int main()
 {
-// CHECK: [[ASSIGNMENT]] = !MDLocation(line: [[@LINE+2]],
-// CHECK: [[BLOCK_ENTRY]] = !MDLocation(line: [[@LINE+1]],
+// CHECK: [[ASSIGNMENT]] = !DILocation(line: [[@LINE+2]],
+// CHECK: [[BLOCK_ENTRY]] = !DILocation(line: [[@LINE+1]],
     int (^blockptr)(void) = ^(void) {
       return 0;
     };
index 282fa4f9f50c747b48bae349d4cb9b5d9520652e..e0e5bd91249a2ee84091590a6556f21e22662aa7 100644 (file)
@@ -11,8 +11,8 @@
 // out of order or not at all (the latter would occur if they were both assigned
 // the same argument number by mistake).
 
-// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: ".block_descriptor", arg: 1,{{.*}}line: 2,
-// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "param", arg: 2,{{.*}}line: 2,
+// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable, name: ".block_descriptor", arg: 1,{{.*}}line: 2,
+// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable, name: "param", arg: 2,{{.*}}line: 2,
 
 // Line directive so we don't have to worry about how many lines preceed the
 // test code (as the line number is mangled in with the argument number as shown
index 4b5706b3324a8070c180450810a090f76b5a3ccc..c4930bfc3c866f0e5be2141341921e898f1d88e3 100644 (file)
@@ -2,8 +2,8 @@
 // Verify that the desired debugging type is generated for a structure
 //  member that is a pointer to a block. 
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "__block_literal_generic"
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "__block_descriptor"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_literal_generic"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_descriptor"
 struct inStruct {
   void (^genericBlockPtr)();
 } is;
index e32c7313ee27325480333abef44c899a628ba302..4474e4000e95a731f12cb0050b3819599f0c5ab6 100644 (file)
@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
 
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "e"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
 // CHECK-SAME:             elements: [[TEST3_ENUMS:![0-9]*]]
 // CHECK: [[TEST3_ENUMS]] = !{[[TEST3_E:![0-9]*]]}
-// CHECK: [[TEST3_E]] = !MDEnumerator(name: "E", value: -1)
+// CHECK: [[TEST3_E]] = !DIEnumerator(name: "E", value: -1)
 
 enum e;
 void func(enum e *p) {
index f4c1251d17354fe67efd285e994c938331e8d47d..abcffaf9bb4007f7dbeecb569026ee9f320997f5 100644 (file)
@@ -14,9 +14,9 @@ int foo() {
   return i + j;
 }
 
-// CHECK-NOT: !MDLexicalBlock
-// CHECK: !MDLexicalBlockFile({{.*}}file: ![[MH:[0-9]+]]
-// CHECK: !MDFile(filename: "m.h"
-// CHECK: !MDLexicalBlockFile({{.*}}file: ![[MC:[0-9]+]]
-// CHECK: !MDFile(filename: "m.c"
-// CHECK-NOT: !MDLexicalBlock
+// CHECK-NOT: !DILexicalBlock
+// CHECK: !DILexicalBlockFile({{.*}}file: ![[MH:[0-9]+]]
+// CHECK: !DIFile(filename: "m.h"
+// CHECK: !DILexicalBlockFile({{.*}}file: ![[MC:[0-9]+]]
+// CHECK: !DIFile(filename: "m.c"
+// CHECK-NOT: !DILexicalBlock
index e28856f308481e28f3246602c9c72ef252d327cd..be457ab0b7ab5f6f7bf3053adc5fda1c1964036b 100644 (file)
@@ -8,6 +8,6 @@ int main() {
 }
 
 // CHECK: !llvm.dbg.cu = !{!0}
-// CHECK: !MDCompileUnit(
-// CHECK: !MDSubprogram(
-// CHECK: !MDFile(
+// CHECK: !DICompileUnit(
+// CHECK: !DISubprogram(
+// CHECK: !DIFile(
index 72f9fb7486c2ebbe6b0cb0004cdcf979f5d4d137..7c20ca4dd625fd820f3e97263187349604d39472 100644 (file)
@@ -3,7 +3,7 @@
 // Ensure we emit the full definition of 'foo' even though only its declaration
 // is needed, since C has no ODR to ensure that the definition will be the same
 // in whatever TU actually uses/requires the definition of 'foo'.
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
 
index 2e044d2ab3756f00e3f431a4066890f8e7a501da..bc0d23a200033491c849d07a927366af38db620e 100644 (file)
@@ -8,4 +8,4 @@ int f1(int a, int b) {
          b;
 }
 
-// CHECK: [[DBG_F1]] = !MDLocation(line: 100,
+// CHECK: [[DBG_F1]] = !DILocation(line: 100,
index d2efcf724094e441f65e070a2befcac5413d2795..8ba57e208c04fba82826f96f4c9d1a62365115fa 100644 (file)
@@ -13,4 +13,4 @@ void func(char c, char* d)
 }
 
 // CHECK: ret void, !dbg [[LINE:.*]]
-// CHECK: [[LINE]] = !MDLocation(line: 6,
+// CHECK: [[LINE]] = !DILocation(line: 6,
index 2b3e0fe5bc6555b082be8c12f21c057a533b4da7..3c99fc5521175336121cd4ab54c40737e909ce8d 100644 (file)
@@ -8,4 +8,4 @@ int foo(int a, int b) { int c = a + b;
 }
 
 // Without column information we wouldn't change locations for b.
-// CHECK:  !MDLocation(line: 4, column: 20,
+// CHECK:  !DILocation(line: 4, column: 20,
index e9fe3a7ab13e711b430ea334262eb69898e7c3c4..7b71f57a682ffa5ece7ea93ee176479a35bf0dc2 100644 (file)
@@ -2,6 +2,6 @@
 // Here two temporary nodes are identical (but should not get uniqued) while
 // building the full debug type.
 typedef struct { long x; } foo; typedef struct {  foo *x; } bar;
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type,{{.*}} line: 4, size: 64,
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type,{{.*}} line: 4, size: 64,
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type,{{.*}} line: 4, size: 64,
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type,{{.*}} line: 4, size: 64,
 bar b;
index 74456a0bfb33fdc4907aa95d34907d5fc5e6d275..97063198a95cd9a9b45795524524e64fc718d232 100644 (file)
@@ -5,10 +5,10 @@
 
 // CHECK: ret void, !dbg [[F1_LINE:![0-9]*]]
 // CHECK: ret void, !dbg [[F2_LINE:![0-9]*]]
-// CHECK: [[F1:![0-9]*]] = !MDSubprogram(name: "f1",{{.*}} isDefinition: true
-// CHECK: [[F2:![0-9]*]] = !MDSubprogram(name: "f2",{{.*}} isDefinition: true
-// CHECK: [[F1_LINE]] = !MDLocation({{.*}}, scope: [[F1]])
-// CHECK: [[F2_LINE]] = !MDLocation({{.*}}, scope: [[F2]])
+// CHECK: [[F1:![0-9]*]] = !DISubprogram(name: "f1",{{.*}} isDefinition: true
+// CHECK: [[F2:![0-9]*]] = !DISubprogram(name: "f2",{{.*}} isDefinition: true
+// CHECK: [[F1_LINE]] = !DILocation({{.*}}, scope: [[F1]])
+// CHECK: [[F2_LINE]] = !DILocation({{.*}}, scope: [[F2]])
 
 void f1() {
 }
index 5709e3e9de475d1a1c9fc7b13cffb36d50373adc..aa6e5c1f2da0c6fededca5c7a62ed31c3f8dec71 100644 (file)
@@ -5,23 +5,23 @@
 int main() {
        int j = 0;
        int k = 0;
-// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i"
-// CHECK-NEXT: !MDLexicalBlock(
+// CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
+// CHECK-NEXT: !DILexicalBlock(
 
 // FIXME: Looks like we don't actually need both these lexical blocks (disc 2
 // just refers to disc 1, nothing actually uses disc 2).
-// GMLT-NOT: !MDLexicalBlock
-// GMLT: !MDLexicalBlockFile({{.*}}, discriminator: 2)
-// GMLT-NOT: !MDLexicalBlock
-// GMLT: !MDLexicalBlockFile({{.*}}, discriminator: 1)
+// GMLT-NOT: !DILexicalBlock
+// GMLT: !DILexicalBlockFile({{.*}}, discriminator: 2)
+// GMLT-NOT: !DILexicalBlock
+// GMLT: !DILexicalBlockFile({{.*}}, discriminator: 1)
 // Make sure we don't have any more lexical blocks because we don't need them in
 // -gmlt.
-// GMLT-NOT: !MDLexicalBlock
+// GMLT-NOT: !DILexicalBlock
        for (int i = 0; i < 10; i++)
                j++;
-// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i"
-// CHECK-NEXT: !MDLexicalBlock(
-// GMLT-NOT: !MDLexicalBlock
+// CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
+// CHECK-NEXT: !DILexicalBlock(
+// GMLT-NOT: !DILexicalBlock
        for (int i = 0; i < 10; i++)
                k++;
        return 0;
index cd4526ab124798958e9c29c3d12e6edb4e91c401..115beaf84d40a133365c524dbdab0b9498d78b72 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1  -g -emit-llvm -o - %s | FileCheck %s
 
-// CHECK: !MDGlobalVariable({{.*}}variable: i32* @f.xyzzy
+// CHECK: !DIGlobalVariable({{.*}}variable: i32* @f.xyzzy
 void f(void)
 {
    static int xyzzy;
index a50b7f169cb297a5e8ae103d65b1d5a62f7570d7..790e302984a9c0c2b32801d6f10d9baef6bd9184 100644 (file)
@@ -7,5 +7,5 @@ typedef int MyType;
 
 MyType a;
 
-// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "MyType", file: ![[HEADER:[0-9]+]], line: 2,
-// CHECK: ![[HEADER]] = !MDFile(filename: "b.h",
+// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "MyType", file: ![[HEADER:[0-9]+]], line: 2,
+// CHECK: ![[HEADER]] = !DIFile(filename: "b.h",
index 047f1b2f73ace3c7eabf753979fcc0cc6b982af1..1075643cd602d8abd79040021cfef4a74e52dc61 100644 (file)
@@ -4,8 +4,8 @@ typedef int v4si __attribute__((__vector_size__(16)));
 v4si a;
 
 // Test that we get an array type that's also a vector out of debug.
-// CHECK: !MDCompositeType(tag: DW_TAG_array_type,
+// CHECK: !DICompositeType(tag: DW_TAG_array_type,
 // CHECK-SAME:             baseType: ![[INT:[0-9]+]]
 // CHECK-SAME:             size: 128, align: 128
 // CHECK-SAME:             DIFlagVector
-// CHECK: ![[INT]] = !MDBasicType(name: "int"
+// CHECK: ![[INT]] = !DIBasicType(name: "int"
index d58dc918c76cf2f499ccc920c1f5be9656c6f1a6..175c24cfb9dce80851c2b8378c71cdc205b7cc94 100644 (file)
@@ -4,8 +4,8 @@ void testVLAwithSize(int s)
 {
 // CHECK: dbg.declare
 // CHECK: dbg.declare({{.*}}, metadata ![[VAR:.*]], metadata ![[EXPR:.*]])
-// CHECK: ![[VAR]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "vla",{{.*}} line: [[@LINE+2]]
-// CHECK: ![[EXPR]] = !MDExpression(DW_OP_deref)
+// CHECK: ![[VAR]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "vla",{{.*}} line: [[@LINE+2]]
+// CHECK: ![[EXPR]] = !DIExpression(DW_OP_deref)
   int vla[s];
   int i;
   for (i = 0; i < s; i++) {
index e1ee08768a31ab0991eddfb23c2af85247687b16..1a505ee8bfb823f1e39fefce769b85eaf52ad59d 100644 (file)
@@ -42,7 +42,7 @@ struct foo2 foo2;
 
 
 // Radar 7325611
-// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "barfoo"
+// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "barfoo"
 typedef int barfoo;
 barfoo foo() {
 }
index 5d83cbc4ab195130c2a72a8b015e82801534d50b..674346a031d2d73fddda70ee7f9d820225b0211f 100644 (file)
@@ -8,6 +8,6 @@ extern int x;
 int f() {
   int *p = &x;
 // CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]*]]
-// CHECK: [[DI]] = !MDLocation(line: [[@LINE+1]]
+// CHECK: [[DI]] = !DILocation(line: [[@LINE+1]]
   return *p;
 }
index db01c81db6d6af2cadf48a1f90a017a107dc24ce..03afbd8c18b709188c5b1e71fb57188dd4379f94 100644 (file)
@@ -25,5 +25,5 @@ int test(int a, int b) {
 
   return res;
 // CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]+]]
-// CHECK: [[DI]] = !MDLocation(line: [[@LINE-2]]
+// CHECK: [[DI]] = !DILocation(line: [[@LINE-2]]
 }
index 1a0b7019f22bb35f3915528096d2c23d989a0388..ac61c8364949459aa4b13983a84e27cf74b7a1c3 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: echo "#include <stddef.h>" > %t.h
 // RUN: %clang_cc1 -S -g -include %t.h %s -emit-llvm -o - | FileCheck %s
 
-// CHECK: !MDGlobalVariable(name: "outer",
+// CHECK: !DIGlobalVariable(name: "outer",
 // CHECK-NOT:               linkageName:
 // CHECK-SAME:              line: [[@LINE+2]]
 // CHECK-SAME:              isDefinition: true
index 9a737cf79655c6ffd29224ca7136565f6c417662..961eaec7dece951b774e621468e71f83e05376bb 100644 (file)
@@ -11,7 +11,7 @@
 void foo(char c)
 {
   int i;
-  // CHECK: ![[CONV]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[CONV]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   i = c;
-  // CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
index a1e1739ea7758dac3a02fda48ed763c8a630d2f7..3bd66da62afe6e9c23fe58fbe7074bda98d1faf7 100644 (file)
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
 // Require the template function declaration refer to the correct filename.
 // First, locate the function decl in metadata, and pluck out the file handle:
-// CHECK: !MDSubprogram(name: "extract_dwarf_data_from_header
+// CHECK: !DISubprogram(name: "extract_dwarf_data_from_header
 // CHECK-SAME:          file: [[FILE:![0-9]+]]
 // Second: Require that filehandle refer to the correct filename:
-// CHECK: [[FILE]] = !MDFile(filename: "decl_should_be_here.hpp"
+// CHECK: [[FILE]] = !DIFile(filename: "decl_should_be_here.hpp"
 typedef long unsigned int __darwin_size_t;
 typedef __darwin_size_t size_t;
 typedef unsigned char uint8_t;
index be3d6dbe9e948bb01c588f7c1fd1e916753730f7..17fa456a45d91a90d2882e8d548bc427d08d8b35 100644 (file)
@@ -1,5 +1,5 @@
 
-// CHECK-DAG: !MDCompositeType(tag: DW_TAG_structure_type, name: "PR16214",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
+// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "PR16214",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
 struct PR16214 {
   int i;
 };
@@ -10,7 +10,7 @@ bar *a;
 bar b;
 
 namespace PR14467 {
-// CHECK-DAG: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
+// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
 struct foo {
 };
 
@@ -21,7 +21,7 @@ foo *bar(foo *a) {
 }
 
 namespace test1 {
-// CHECK-DAG: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
+// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
 struct foo {
 };
 
@@ -35,7 +35,7 @@ namespace test2 {
 // FIXME: if we were a bit fancier, we could realize that the 'foo' type is only
 // required because of the 'bar' type which is not required at all (or might
 // only be required to be declared)
-// CHECK-DAG: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
+// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} isDefinition: true
 struct foo {
 };
 
index a76a10017a1607da79db0c84c0c586df8ae36de0..0a10244db0e778ad2b29646f8b35199c301f25a0 100644 (file)
@@ -6,9 +6,9 @@ struct C {
 extern bool b;
 // CHECK: call {{.*}}, !dbg [[DTOR_CALL1_LOC:![0-9]*]]
 // CHECK: call {{.*}}, !dbg [[DTOR_CALL2_LOC:![0-9]*]]
-// CHECK: [[FUN1:.*]] = !MDSubprogram(name: "fun1",{{.*}} isDefinition: true
-// CHECK: [[FUN2:.*]] = !MDSubprogram(name: "fun2",{{.*}} isDefinition: true
-// CHECK: [[DTOR_CALL1_LOC]] = !MDLocation(line: [[@LINE+1]], scope: [[FUN1]])
+// CHECK: [[FUN1:.*]] = !DISubprogram(name: "fun1",{{.*}} isDefinition: true
+// CHECK: [[FUN2:.*]] = !DISubprogram(name: "fun2",{{.*}} isDefinition: true
+// CHECK: [[DTOR_CALL1_LOC]] = !DILocation(line: [[@LINE+1]], scope: [[FUN1]])
 void fun1() { b && (C(), 1); }
-// CHECK: [[DTOR_CALL2_LOC]] = !MDLocation(line: [[@LINE+1]], scope: [[FUN2]])
+// CHECK: [[DTOR_CALL2_LOC]] = !DILocation(line: [[@LINE+1]], scope: [[FUN2]])
 bool fun2() { return (C(), b) && 0; }
index 5460e2bfd0c6a7bb2950fa791416368bcec3a1e4..4b23324afaff3dbc5a193fd803158838514e6f27 100644 (file)
@@ -3,7 +3,7 @@
 extern "C" void test_name1() {}
 void test_name2() {}
 
-// CHECK: !MDSubprogram(name: "test_name1",
+// CHECK: !DISubprogram(name: "test_name1",
 // CHECK-NOT:           linkageName:
 // CHECK-SAME:          ){{$}}
-// CHECK: !MDSubprogram(name: "test_name2", linkageName: "_Z10test_name2v"
+// CHECK: !DISubprogram(name: "test_name2", linkageName: "_Z10test_name2v"
index d2ae8f41f63bb6402ef72a35cc689115b032690d..86237b3bc3285c4a7aaefed14695cc0ade7bb6d5 100644 (file)
@@ -1,37 +1,37 @@
 // RUN: %clang_cc1 -emit-llvm -g -triple %itanium_abi_triple %s -o - | FileCheck %s
 // Test the various accessibility flags in the debug info.
 struct A {
-  // CHECK-DAG: !MDSubprogram(name: "pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
+  // CHECK-DAG: !DISubprogram(name: "pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
   void pub_default();
-  // CHECK-DAG: !MDDerivedType(tag: DW_TAG_member, name: "pub_default_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagStaticMember)
+  // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "pub_default_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagStaticMember)
   static int pub_default_static;
 };
 
-// CHECK: !MDDerivedType(tag: DW_TAG_inheritance,{{.*}} baseType: !"_ZTS1A",{{.*}} flags: DIFlagPublic)
+// CHECK: !DIDerivedType(tag: DW_TAG_inheritance,{{.*}} baseType: !"_ZTS1A",{{.*}} flags: DIFlagPublic)
 class B : public A {
 public:
-  // CHECK-DAG: !MDSubprogram(name: "pub",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagPrototyped,
+  // CHECK-DAG: !DISubprogram(name: "pub",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagPrototyped,
   void pub();
-  // CHECK-DAG: !MDDerivedType(tag: DW_TAG_member, name: "public_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagStaticMember)
+  // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "public_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagStaticMember)
   static int public_static;
 protected:
-  // CHECK: !MDSubprogram(name: "prot",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagProtected | DIFlagPrototyped,
+  // CHECK: !DISubprogram(name: "prot",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagProtected | DIFlagPrototyped,
   void prot();
 private:
-  // CHECK: !MDSubprogram(name: "priv_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
+  // CHECK: !DISubprogram(name: "priv_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
   void priv_default();
 };
 
 union U {
-  // CHECK-DAG: !MDSubprogram(name: "union_pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
+  // CHECK-DAG: !DISubprogram(name: "union_pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
   void union_pub_default();
 private:
-  // CHECK-DAG: !MDDerivedType(tag: DW_TAG_member, name: "union_priv",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrivate)
+  // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "union_priv",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrivate)
   int union_priv;
 };
 
 
-// CHECK: !MDSubprogram(name: "free",
+// CHECK: !DISubprogram(name: "free",
 // CHECK-SAME:          isDefinition: true
 // CHECK-SAME:          flags: DIFlagPrototyped,
 void free() {}
index ffe5c752178cc457acc059b41d6ed5af2d8ff14a..90476439e78225d32933ab4e89caa14b75cda4b3 100644 (file)
@@ -13,27 +13,27 @@ bar
 = foo<T*>;
 }
 
-// CHECK: !MDGlobalVariable(name: "bi",{{.*}} type: [[BINT:![0-9]+]]
-// CHECK: [[BINT]] = !MDDerivedType(tag: DW_TAG_typedef, name: "bar<int>"
+// CHECK: !DIGlobalVariable(name: "bi",{{.*}} type: [[BINT:![0-9]+]]
+// CHECK: [[BINT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<int>"
 // CHECK-SAME:                      line: 42,
 x::bar<int> bi;
-// CHECK: !MDGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]]
-// CHECK: [[BFLOAT]] = !MDDerivedType(tag: DW_TAG_typedef, name: "bar<float>"
+// CHECK: !DIGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]]
+// CHECK: [[BFLOAT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<float>"
 x::bar<float> bf;
 
 using
-// CHECK: !MDGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]]
+// CHECK: !DIGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]]
 # 142
-narf // CHECK: [[NARF]] = !MDDerivedType(tag: DW_TAG_typedef, name: "narf"
+narf // CHECK: [[NARF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "narf"
 // CHECK-SAME:                           line: 142
 = int;
 narf n;
 
 template <typename T>
 using tv = void;
-// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "tv<int>"
+// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "tv<int>"
 tv<int> *tvp;
 
 using v = void;
-// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "v"
+// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "v"
 v *vp;
index d75ce69d4c6c026a263b287c1f8cb3e68dbef5f3..cfc7bc8fbfe01c49dfab8c76efb60d95239b9b73 100644 (file)
@@ -21,8 +21,8 @@ int test_it() {
   return (c == 1);
 }
 
-// CHECK: [[FILE:.*]] = !MDFile(filename: "{{.*}}debug-info-anon-union-vars.cpp",
-// CHECK: !MDGlobalVariable(name: "c",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
-// CHECK: !MDGlobalVariable(name: "d",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
-// CHECK: !MDGlobalVariable(name: "a",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
-// CHECK: !MDGlobalVariable(name: "b",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
+// CHECK: [[FILE:.*]] = !DIFile(filename: "{{.*}}debug-info-anon-union-vars.cpp",
+// CHECK: !DIGlobalVariable(name: "c",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
+// CHECK: !DIGlobalVariable(name: "d",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
+// CHECK: !DIGlobalVariable(name: "a",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
+// CHECK: !DIGlobalVariable(name: "b",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
index 2f03688b60ff906bc9ef92c7580df7abbd4007c4..dc3ac8a454062256c8246916c6b5d2b62907a097 100644 (file)
@@ -22,12 +22,12 @@ int main(int argc, char **argv) {
   A reallyA (500);
 }
 
-// CHECK: ![[CLASSTYPE:.*]] = !MDCompositeType(tag: DW_TAG_class_type, name: "A",
+// CHECK: ![[CLASSTYPE:.*]] = !DICompositeType(tag: DW_TAG_class_type, name: "A",
 // CHECK-SAME:                                 identifier: "_ZTS1A"
-// CHECK: ![[ARTARG:.*]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A",
+// CHECK: ![[ARTARG:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A",
 // CHECK-SAME:                            DIFlagArtificial
-// CHECK: !MDSubprogram(name: "A", scope: !"_ZTS1A"
+// CHECK: !DISubprogram(name: "A", scope: !"_ZTS1A"
 // CHECK-SAME:          line: 12
 // CHECK-SAME:          DIFlagPublic
-// CHECK: !MDSubroutineType(types: [[FUNCTYPE:![0-9]*]])
+// CHECK: !DISubroutineType(types: [[FUNCTYPE:![0-9]*]])
 // CHECK: [[FUNCTYPE]] = !{null, ![[ARTARG]], !{{.*}}, !{{.*}}}
index 608a273cb0bd9c4db4c690f4a9fa5c288ab8502c..7762726dc77fb61d648862565e6f90527c331af7 100644 (file)
@@ -10,9 +10,9 @@ void test() {
   __block A a;
 }
 
-// CHECK: !MDSubprogram(name: "__Block_byref_object_copy_",
+// CHECK: !DISubprogram(name: "__Block_byref_object_copy_",
 // CHECK-SAME:          line: 10,
 // CHECK-SAME:          isLocal: true, isDefinition: true
-// CHECK: !MDSubprogram(name: "__Block_byref_object_dispose_",
+// CHECK: !DISubprogram(name: "__Block_byref_object_dispose_",
 // CHECK-SAME:          line: 10,
 // CHECK-SAME:          isLocal: true, isDefinition: true
index c2606d4c6d071f14293e4541192919ca75240178..912da6f86e5cdaa18bd075f428e1f6b56013b53e 100644 (file)
@@ -3,5 +3,5 @@
 // 16 is DW_ATE_UTF (0x10) encoding attribute.
 char16_t char_a = u'h';
 
-// CHECK: !{{.*}} = !MDBasicType(name: "char16_t"
+// CHECK: !{{.*}} = !DIBasicType(name: "char16_t"
 // CHECK-SAME:                   encoding: DW_ATE_UTF)
index 042794c9a0626aaa22b117a855334cdec1650b7e..11d1792e6f33afdc9c5a20b133b9bceda9900d14 100644 (file)
@@ -6,7 +6,7 @@ namespace rdar14101097_1 { // see also PR16214
 // Check that we emit debug info for the definition of a struct if the
 // definition is available, even if it's used via a pointer wrapped in a
 // typedef.
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
 struct foo {
@@ -23,7 +23,7 @@ namespace rdar14101097_2 {
 // As above, except trickier because we first encounter only a declaration of
 // the type and no debug-info related use after we see the definition of the
 // type.
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
 struct foo;
index b4f88eade847a7d8e5083bad18f20e78dd9fdb1a..a63efe5d780a314a311c7bdc6baf3795cca92bd1 100644 (file)
@@ -90,63 +90,63 @@ int main(int argc, char **argv) {
 // CHECK: invoke {{.+}} @_ZN1BD1Ev(%class.B* %b)
 // CHECK-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]]
 // CHECK: store i32 0, i32* %{{.+}}, !dbg ![[RETLOC:.*]]
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo"
-// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "bar"
-// CHECK: !MDCompositeType(tag: DW_TAG_union_type, name: "baz"
-// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "B"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
+// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "bar"
+// CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "baz"
+// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B"
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "_vptr$B",
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$B",
 // CHECK-SAME:           DIFlagArtificial
 
-// CHECK: ![[INT:[0-9]+]] = !MDBasicType(name: "int"
+// CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
 
-// CHECK: [[C:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "C",
+// CHECK: [[C:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "C",
 // CHECK-NOT:                              DIFlagFwdDecl
 // CHECK-SAME:                             elements: [[C_MEM:![0-9]*]]
 // CHECK-SAME:                             vtableHolder: !"_ZTS1C"
 // CHECK-SAME:                             identifier: "_ZTS1C"
 // CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_S:![0-9]*]], [[C_DTOR:![0-9]*]]}
-// CHECK: [[C_VPTR]] = !MDDerivedType(tag: DW_TAG_member, name: "_vptr$C"
+// CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$C"
 // CHECK-SAME:                        DIFlagArtificial
-// CHECK: [[C_S]] = !MDDerivedType(tag: DW_TAG_member, name: "s"
+// CHECK: [[C_S]] = !DIDerivedType(tag: DW_TAG_member, name: "s"
 // CHECK-SAME:                     baseType: ![[INT]]
 // CHECK-SAME:                     DIFlagStaticMember
-// CHECK: [[C_DTOR]] = !MDSubprogram(name: "~C"
+// CHECK: [[C_DTOR]] = !DISubprogram(name: "~C"
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "D"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "D"
 // CHECK-SAME:             DIFlagFwdDecl
 // CHECK-SAME:             identifier: "_ZTS1D"
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "E"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "E"
 // CHECK-SAME:             DIFlagFwdDecl
 // CHECK-SAME:             identifier: "_ZTS1E"
-// CHECK: [[F:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "F"
+// CHECK: [[F:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "F"
 // CHECK-SAME:                             DIFlagFwdDecl
 // CHECK-SAME:                             identifier: "_ZTS1F"
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "G"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G"
 // CHECK-SAME:             DIFlagFwdDecl
 // CHECK-SAME:             identifier: "_ZTS1G"
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "inner"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "inner"
 // CHECK: line: 50
 // CHECK-NOT: DIFlagFwdDecl
 // CHECK-SAME: elements: [[G_INNER_MEM:![0-9]*]]
 // CHECK-SAME: identifier: "_ZTSN1G5innerE"
 // CHECK: [[G_INNER_MEM]] = !{[[G_INNER_I:![0-9]*]]}
-// CHECK: [[G_INNER_I]] = !MDDerivedType(tag: DW_TAG_member, name: "j"
+// CHECK: [[G_INNER_I]] = !DIDerivedType(tag: DW_TAG_member, name: "j"
 // CHECK-SAME:                           baseType: ![[INT]]
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "A"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "HdrSize"
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "I"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "HdrSize"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
 //
-// CHECK: !MDSubprogram(name: "func",{{.*}} scope: !"_ZTS1D"
+// CHECK: !DISubprogram(name: "func",{{.*}} scope: !"_ZTS1D"
 // CHECK-SAME:          isDefinition: true
 // CHECK-SAME:          declaration: [[D_FUNC_DECL:![0-9]*]]
-// CHECK: [[D_FUNC_DECL]] = !MDSubprogram(name: "func",{{.*}} scope: !"_ZTS1D"
+// CHECK: [[D_FUNC_DECL]] = !DISubprogram(name: "func",{{.*}} scope: !"_ZTS1D"
 // CHECK-SAME:                            isDefinition: false
 
-// CHECK: ![[EXCEPTLOC]] = !MDLocation(line: 84,
-// CHECK: ![[RETLOC]] = !MDLocation(line: 83,
+// CHECK: ![[EXCEPTLOC]] = !DILocation(line: 84,
+// CHECK: ![[RETLOC]] = !DILocation(line: 83,
index cd75fcd076b42a03cb655a11ab1c178b5ba4cd0e..026be3d522324aecbb5d0e4c667108d3a345aad6 100644 (file)
@@ -1,17 +1,17 @@
 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -g %s -o - | FileCheck %s
 
 // CHECK: [[EMPTY:![0-9]*]] = !{}
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
 // CHECK-SAME:             elements: [[EMPTY]]
 // FIXME: The context of this definition should be the CU/file scope, not the class.
-// CHECK: !MDSubprogram(name: "func", {{.*}} scope: !"_ZTS3foo"
+// CHECK: !DISubprogram(name: "func", {{.*}} scope: !"_ZTS3foo"
 // CHECK-SAME:          type: [[SUBROUTINE_TYPE:![0-9]*]]
 // CHECK-SAME:          isDefinition: true
 // CHECK-SAME:          declaration: [[FUNC_DECL:![0-9]*]]
-// CHECK: [[SUBROUTINE_TYPE]] = !MDSubroutineType(types: [[TYPE_LIST:![0-9]*]])
+// CHECK: [[SUBROUTINE_TYPE]] = !DISubroutineType(types: [[TYPE_LIST:![0-9]*]])
 // CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]}
-// CHECK: [[INT]] = !MDBasicType(name: "int"
-// CHECK: [[FUNC_DECL]] = !MDSubprogram(name: "func",
+// CHECK: [[INT]] = !DIBasicType(name: "int"
+// CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func",
 // CHECK-SAME:                          scope: !"_ZTS3foo"
 // CHECK-SAME:                          type: [[SUBROUTINE_TYPE]]
 // CHECK-SAME:                          isDefinition: false
index 6ceb31bf9af1328b24616a24d7d21b8d556f346f..2c35241753926c6ac455b945f25a7401ed82d28d 100644 (file)
@@ -17,13 +17,13 @@ class OuterClass
   public:
     InnerClass(); // Here createContextChain() generates a limited type for OuterClass.
   } theInnerClass;
-// CHECK0: ![[DECL:[0-9]+]] = !MDSubprogram(name: "OuterClass"
+// CHECK0: ![[DECL:[0-9]+]] = !DISubprogram(name: "OuterClass"
 // CHECK0-SAME: line: [[@LINE+2]]
 // CHECK0-SAME: isDefinition: false
   OuterClass(const Foo *); // line 10
 };
 OuterClass::InnerClass OuterClass::theInnerClass; // This toplevel decl causes InnerClass to be generated.
-// CHECK0: !MDSubprogram(name: "OuterClass"
+// CHECK0: !DISubprogram(name: "OuterClass"
 // CHECK0-SAME: line: [[@LINE+3]]
 // CHECK0-SAME: isDefinition: true
 // CHECK0-SAME: declaration: ![[DECL]]
@@ -41,13 +41,13 @@ class OuterClass1
   public:
     InnerClass1();
   } theInnerClass1;
-// CHECK1: ![[DECL:[0-9]+]] = !MDSubprogram(name: "Bar"
+// CHECK1: ![[DECL:[0-9]+]] = !DISubprogram(name: "Bar"
 // CHECK1-SAME: line: [[@LINE+2]]
 // CHECK1-SAME: isDefinition: false
   void Bar(const Foo1 *);
 };
 OuterClass1::InnerClass1 OuterClass1::theInnerClass1;
-// CHECK1: !MDSubprogram(name: "Bar"
+// CHECK1: !DISubprogram(name: "Bar"
 // CHECK1-SAME: line: [[@LINE+3]]
 // CHECK1-SAME: isDefinition: true
 // CHECK1-SAME: declaration: ![[DECL]]
@@ -64,13 +64,13 @@ class OuterClass2
   public:
     InnerClass2();
   } theInnerClass2;
-// CHECK2: ![[DECL:[0-9]+]] = !MDSubprogram(name: "~OuterClass2"
+// CHECK2: ![[DECL:[0-9]+]] = !DISubprogram(name: "~OuterClass2"
 // CHECK2-SAME: line: [[@LINE+2]]
 // CHECK2-SAME: isDefinition: false
   ~OuterClass2(); // line 10
 };
 OuterClass2::InnerClass2 OuterClass2::theInnerClass2;
-// CHECK4: !MDSubprogram(name: "~OuterClass2"
+// CHECK4: !DISubprogram(name: "~OuterClass2"
 // CHECK4-SAME: line: [[@LINE+3]]
 // CHECK4-SAME: isDefinition: true
 // CHECK4-SAME: declaration: ![[DECL]]
index c3458aeb6576e74eeee2d0e16254d7b8de65d1c4..db9d2e9f491d6977c78cd974317432460f6c7e12 100644 (file)
@@ -19,6 +19,6 @@ protected:
 
 Test t;
 
-// CHECK: !MDDerivedType(tag: DW_TAG_pointer_type
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "data"
-// CHECK-NOT: !MDCompositeType(tag: DW_TAG_structure_type, name: "data"
+// CHECK: !DIDerivedType(tag: DW_TAG_pointer_type
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
+// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
index 61b502e40d71a79e9fcc075a98887dfae07830db..ded18bffe3778a8cf3f2e9bd861a9eaab1b18b6b 100644 (file)
@@ -9,23 +9,23 @@ B b;
 C c;
 D d;
 
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "A"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "A"
 // CHECK-SAME:             line: 3
 // CHECK-SAME:             baseType: ![[INT:[0-9]+]]
 // CHECK-SAME:             size: 32, align: 32
 // CHECK-NOT:              offset:
 // CHECK-NOT:              flags:
 // CHECK-SAME:             ){{$}}
-// CHECK: ![[INT]] = !MDBasicType(name: "int"
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "B"
+// CHECK: ![[INT]] = !DIBasicType(name: "int"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "B"
 // CHECK-SAME:             line: 4
 // CHECK-SAME:             baseType: ![[ULONG:[0-9]+]]
 // CHECK-SAME:             size: 64, align: 64
 // CHECK-NOT:              offset:
 // CHECK-NOT:              flags:
 // CHECK-SAME:             ){{$}}
-// CHECK: ![[ULONG]] = !MDBasicType(name: "long unsigned int"
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "C"
+// CHECK: ![[ULONG]] = !DIBasicType(name: "long unsigned int"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "C"
 // CHECK-SAME:             line: 5
 // CHECK-NOT:              baseType:
 // CHECK-SAME:             size: 32, align: 32
@@ -49,13 +49,13 @@ namespace PR14029 {
 
 namespace test2 {
 // FIXME: this should just be a declaration under -fno-standalone-debug
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
 // CHECK-SAME:             scope: [[TEST2:![0-9]+]]
 // CHECK-SAME:             elements: [[TEST_ENUMS:![0-9]+]]
 // CHECK-SAME:             identifier: "_ZTSN5test21EE"
-// CHECK: [[TEST2]] = !MDNamespace(name: "test2"
+// CHECK: [[TEST2]] = !DINamespace(name: "test2"
 // CHECK: [[TEST_ENUMS]] = !{[[TEST_E:![0-9]*]]}
-// CHECK: [[TEST_E]] = !MDEnumerator(name: "e", value: 0)
+// CHECK: [[TEST_E]] = !DIEnumerator(name: "e", value: 0)
 enum E : int;
 void func(E *) {
 }
@@ -64,22 +64,22 @@ enum E : int { e };
 
 namespace test3 {
 // FIXME: this should just be a declaration under -fno-standalone-debug
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
 // CHECK-SAME:             scope: [[TEST3:![0-9]+]]
 // CHECK-SAME:             elements: [[TEST_ENUMS]]
 // CHECK-SAME:             identifier: "_ZTSN5test31EE"
-// CHECK: [[TEST3]] = !MDNamespace(name: "test3"
+// CHECK: [[TEST3]] = !DINamespace(name: "test3"
 enum E : int { e };
 void func(E *) {
 }
 }
 
 namespace test4 {
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
 // CHECK-SAME:             scope: [[TEST4:![0-9]+]]
 // CHECK-SAME:             elements: [[TEST_ENUMS]]
 // CHECK-SAME:             identifier: "_ZTSN5test41EE"
-// CHECK: [[TEST4]] = !MDNamespace(name: "test4"
+// CHECK: [[TEST4]] = !DINamespace(name: "test4"
 enum E : int;
 void f1(E *) {
 }
@@ -88,18 +88,18 @@ void f2(E) {
 }
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "D"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "D"
 // CHECK-SAME:             line: 6
 // CHECK-SAME:             size: 16, align: 16
 // CHECK-NOT:              offset:
 // CHECK-SAME:             flags: DIFlagFwdDecl
 
 namespace test5 {
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
 // CHECK-SAME:             scope: [[TEST5:![0-9]+]]
 // CHECK-SAME:             flags: DIFlagFwdDecl
 // CHECK-SAME:             identifier: "_ZTSN5test51EE"
-// CHECK: [[TEST5]] = !MDNamespace(name: "test5"
+// CHECK: [[TEST5]] = !DINamespace(name: "test5"
 enum E : int;
 void f1(E *) {
 }
index 4ba832870d171b47e7c96e8fbe5291fb0afa6c5b..613ffef7ddb222c261618145bc5eb4adbe2805b8 100644 (file)
@@ -1,17 +1,17 @@
 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
 
-// CHECK: !MDCompileUnit(
+// CHECK: !DICompileUnit(
 // CHECK-SAME:           enums: [[ENUMS:![0-9]*]]
 // CHECK: [[ENUMS]] = !{[[E1:![0-9]*]], [[E2:![0-9]*]], [[E3:![0-9]*]]}
 
 namespace test1 {
-// CHECK: [[E1]] = !MDCompositeType(tag: DW_TAG_enumeration_type, name: "e"
+// CHECK: [[E1]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
 // CHECK-SAME:                      scope: [[TEST1:![0-9]*]]
 // CHECK-SAME:                      elements: [[TEST1_ENUMS:![0-9]*]]
 // CHECK-SAME:                      identifier: "_ZTSN5test11eE"
-// CHECK: [[TEST1]] = !MDNamespace(name: "test1"
+// CHECK: [[TEST1]] = !DINamespace(name: "test1"
 // CHECK: [[TEST1_ENUMS]] = !{[[TEST1_E:![0-9]*]]}
-// CHECK: [[TEST1_E]] = !MDEnumerator(name: "E", value: 0)
+// CHECK: [[TEST1_E]] = !DIEnumerator(name: "E", value: 0)
 enum e { E };
 void foo() {
   int v = E;
@@ -20,11 +20,11 @@ void foo() {
 
 namespace test2 {
 // rdar://8195980
-// CHECK: [[E2]] = !MDCompositeType(tag: DW_TAG_enumeration_type, name: "e"
+// CHECK: [[E2]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
 // CHECK-SAME:                      scope: [[TEST2:![0-9]+]]
 // CHECK-SAME:                      elements: [[TEST1_ENUMS]]
 // CHECK-SAME:                      identifier: "_ZTSN5test21eE"
-// CHECK: [[TEST2]] = !MDNamespace(name: "test2"
+// CHECK: [[TEST2]] = !DINamespace(name: "test2"
 enum e { E };
 bool func(int i) {
   return i == E;
@@ -32,13 +32,13 @@ bool func(int i) {
 }
 
 namespace test3 {
-// CHECK: [[E3]] = !MDCompositeType(tag: DW_TAG_enumeration_type, name: "e"
+// CHECK: [[E3]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
 // CHECK-SAME:                      scope: [[TEST3:![0-9]*]]
 // CHECK-SAME:                      elements: [[TEST3_ENUMS:![0-9]*]]
 // CHECK-SAME:                      identifier: "_ZTSN5test31eE"
-// CHECK: [[TEST3]] = !MDNamespace(name: "test3"
+// CHECK: [[TEST3]] = !DINamespace(name: "test3"
 // CHECK: [[TEST3_ENUMS]] = !{[[TEST3_E:![0-9]*]]}
-// CHECK: [[TEST3_E]] = !MDEnumerator(name: "E", value: -1)
+// CHECK: [[TEST3_E]] = !DIEnumerator(name: "E", value: -1)
 enum e { E = -1 };
 void func() {
   e x;
index 25dcaab6f838338b50ef68d3f57bed304c72b93a..afc9d250c92b1bdb4dd6d4e31718960d4d8023ce 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
 
-// CHECK: !MDSubrange(count: -1)
+// CHECK: !DISubrange(count: -1)
 
 struct StructName {
   int member[];
index f954eebe492e53cae561469fd00dc2b16a503017..2aed4bef71c8ed26e8680b18c24850203b5dc014 100644 (file)
@@ -10,6 +10,6 @@ T fx(XF<T> xi) {
   return xi.member;
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "XF<int>"
-// CHECK: !MDTemplateTypeParameter(name: "T"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "XF<int>"
+// CHECK: !DITemplateTypeParameter(name: "T"
 template int fx(XF<int>);
index f332f7cfff2075e7d40b66b8ba090e43482e7499..9ae96112b57a78b9ccc8eea339720a4f7bbbc137 100644 (file)
@@ -25,12 +25,12 @@ int global_namespace_variable = 1;
 // functions that belong to the namespace have it as a context, and the global
 // function has the file as a context.
 
-// CHECK: ![[FILE:[0-9]+]] = !MDFile(filename: "{{.*}}context.cpp",
-// CHECK: !MDSubprogram(name: "member_function",{{.*}} scope: !"_ZTS1C",{{.*}} isDefinition: true
+// CHECK: ![[FILE:[0-9]+]] = !DIFile(filename: "{{.*}}context.cpp",
+// CHECK: !DISubprogram(name: "member_function",{{.*}} scope: !"_ZTS1C",{{.*}} isDefinition: true
 
-// CHECK: !MDSubprogram(name: "static_member_function",{{.*}} scope: !"_ZTS1C",{{.*}} isDefinition: true
+// CHECK: !DISubprogram(name: "static_member_function",{{.*}} scope: !"_ZTS1C",{{.*}} isDefinition: true
 
-// CHECK: !MDSubprogram(name: "global_function",{{.*}} scope: ![[FILE]],{{.*}} isDefinition: true
+// CHECK: !DISubprogram(name: "global_function",{{.*}} scope: ![[FILE]],{{.*}} isDefinition: true
 
-// CHECK: !MDSubprogram(name: "global_namespace_function",{{.*}} scope: ![[NS:[0-9]+]],{{.*}} isDefinition: true
-// CHECK: ![[NS]] = !MDNamespace(name: "ns"
+// CHECK: !DISubprogram(name: "global_namespace_function",{{.*}} scope: ![[NS:[0-9]+]],{{.*}} isDefinition: true
+// CHECK: ![[NS]] = !DINamespace(name: "ns"
index 351dc0524e9b86d3861c4b2bb13b6472844065e0..247d36411cddd7af6697ba8179a7e7f2f5be7962 100644 (file)
@@ -19,7 +19,7 @@ int main(int argc, char** argv) {
 // Make sure we have two DW_TAG_structure_types for baz and bar and no forward
 // references.
 // CHECK-NOT: DIFlagFwdDecl
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "bar"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "bar"
 // CHECK-NOT:              DIFlagFwdDecl
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "baz"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "baz"
 // CHECK-NOT:              DIFlagFwdDecl
index b91a04721d6cb49de847ba283c19015df1ab89c2..05780b58f9d114ae8e20697df90727063f164e53 100644 (file)
@@ -16,12 +16,12 @@ void foo() {
   static A stat;
 }
 
-// CHECK-NOKEXT: !MDSubprogram(name: "__cxx_global_var_init",{{.*}} line: 12,{{.*}} isLocal: true, isDefinition: true
-// CHECK-NOKEXT: !MDSubprogram(name: "__dtor_glob",{{.*}} line: 12,{{.*}} isLocal: true, isDefinition: true
-// CHECK-NOKEXT: !MDSubprogram(name: "__cxx_global_var_init1",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
-// CHECK-NOKEXT: !MDSubprogram(name: "__cxx_global_array_dtor",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
-// CHECK-NOKEXT: !MDSubprogram(name: "__dtor_array",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
-// CHECK-NOKEXT: !MDSubprogram(name: "__dtor__ZZ3foovE4stat",{{.*}} line: 16,{{.*}} isLocal: true, isDefinition: true
-// CHECK-NOKEXT: !MDSubprogram({{.*}} isLocal: true, isDefinition: true
+// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_var_init",{{.*}} line: 12,{{.*}} isLocal: true, isDefinition: true
+// CHECK-NOKEXT: !DISubprogram(name: "__dtor_glob",{{.*}} line: 12,{{.*}} isLocal: true, isDefinition: true
+// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_var_init1",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
+// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_array_dtor",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
+// CHECK-NOKEXT: !DISubprogram(name: "__dtor_array",{{.*}} line: 13,{{.*}} isLocal: true, isDefinition: true
+// CHECK-NOKEXT: !DISubprogram(name: "__dtor__ZZ3foovE4stat",{{.*}} line: 16,{{.*}} isLocal: true, isDefinition: true
+// CHECK-NOKEXT: !DISubprogram({{.*}} isLocal: true, isDefinition: true
 
-// CHECK-KEXT: !MDSubprogram({{.*}} isLocal: true, isDefinition: true
+// CHECK-KEXT: !DISubprogram({{.*}} isLocal: true, isDefinition: true
index d0e8cb542d1842bc98a8ebb2183b52bcaaebe1dd..8292361eea8fbbe1fcf76fada128d95bfd53c929 100644 (file)
@@ -10,12 +10,12 @@ int f1() {
   return ns::cnst + ns::cnst;
 }
 
-// CHECK: !MDCompileUnit(
+// CHECK: !DICompileUnit(
 // CHECK-SAME:           globals: [[GLOBALS:![0-9]*]]
 
 // CHECK: [[GLOBALS]] = !{[[CNST:![0-9]*]]}
 
-// CHECK: [[CNST]] = !MDGlobalVariable(name: "cnst",
+// CHECK: [[CNST]] = !DIGlobalVariable(name: "cnst",
 // CHECK-SAME:                         scope: [[NS:![0-9]*]]
-// CHECK: [[NS]] = !MDNamespace(name: "ns"
+// CHECK: [[NS]] = !DINamespace(name: "ns"
 
index efba958c9ed02da9ae886576c558500236b6359d..edea3ae35ef45ac03037f45428ef456f115d0b16 100644 (file)
@@ -34,5 +34,5 @@ int main(void) {}
 // CHECK-NOT: __cxx_global_var_init
 // CHECK: store i32 %[[C2]], i32* @_ZL1k, align 4, !dbg
 // 
-// CHECK: ![[LINE]] = !MDLocation(line: 13,
-// CHECK: ![[LINE2]] = !MDLocation(line: 15,
+// CHECK: ![[LINE]] = !DILocation(line: 13,
+// CHECK: ![[LINE2]] = !DILocation(line: 15,
index 87868ebe0efbe9251b11c74d326a07ece477251f..08f71d4b1e16017c86603c7722930bdb8452b0f3 100644 (file)
@@ -7,13 +7,13 @@ template <class T, int T::*ptr> class Foo {  };
 
 struct Bar {
   int i1;
-  // CHECK: ![[INT:[0-9]+]] = !MDBasicType(name: "int"
-  // CHECK: !MDDerivedType(tag: DW_TAG_member, scope:
+  // CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
+  // CHECK: !DIDerivedType(tag: DW_TAG_member, scope:
   // CHECK-SAME:           line: [[@LINE+3]]
   // CHECK-SAME:           baseType: !"_ZTSN3BarUt_E"
   // CHECK-SAME:           size: 32, align: 32, offset: 32
   union {
-    // CHECK: !MDDerivedType(tag: DW_TAG_member, name: "i2",
+    // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "i2",
     // CHECK-SAME:           line: [[@LINE+5]]
     // CHECK-SAME:           baseType: ![[INT]]
     // CHECK-SAME:           size: 32, align: 32
index 63f6bda3a2323b6c3684dc4691180201a12f0f1e..d56e5b670a16a8474ee84c4c95c5eba37891dbd5 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s
 
-// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "A"
+// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A"
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
 class A {
@@ -13,7 +13,7 @@ A *foo (A* x) {
   return a;
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "B"
+// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B"
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
 
@@ -28,7 +28,7 @@ int baz(B *b) {
 }
 
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "C"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "C"
 // CHECK-SAME:             flags: DIFlagFwdDecl
 
 struct C {
index d0205af92bf4f75c5199dbaeffe00007715fbd56..71097259df63bd54d95485b635b419d5b399a298 100644 (file)
@@ -48,8 +48,8 @@ int main() {
   // CHECK: br label
   // CHECK: br label {{.*}}, !dbg [[DBG4:!.*]]
 
-  // CHECK: [[DBG1]] = !MDLocation(line: 100, scope: !{{.*}})
-  // CHECK: [[DBG2]] = !MDLocation(line: 200, scope: !{{.*}})
-  // CHECK: [[DBG3]] = !MDLocation(line: 300, scope: !{{.*}})
-  // CHECK: [[DBG4]] = !MDLocation(line: 401, scope: !{{.*}})
+  // CHECK: [[DBG1]] = !DILocation(line: 100, scope: !{{.*}})
+  // CHECK: [[DBG2]] = !DILocation(line: 200, scope: !{{.*}})
+  // CHECK: [[DBG3]] = !DILocation(line: 300, scope: !{{.*}})
+  // CHECK: [[DBG4]] = !DILocation(line: 401, scope: !{{.*}})
 }
index 98b99d55b3cb9450db92dcd1ec36783a129cdd57..0b1b43b86f3cba7069908aa7c1399be01d8b0159 100644 (file)
@@ -293,32 +293,32 @@ void f24() {
   f24_a();
 }
 
-// CHECK: [[DBG_F1]] = !MDLocation(line: 100,
-// CHECK: [[DBG_FOO_VALUE]] = !MDLocation(line: 200,
-// CHECK: [[DBG_FOO_REF]] = !MDLocation(line: 202,
-// CHECK: [[DBG_FOO_COMPLEX]] = !MDLocation(line: 204,
-// CHECK: [[DBG_F2]] = !MDLocation(line: 300,
-// CHECK: [[DBG_F3]] = !MDLocation(line: 400,
-// CHECK: [[DBG_F4]] = !MDLocation(line: 500,
-// CHECK: [[DBG_F5]] = !MDLocation(line: 600,
-// CHECK: [[DBG_F6]] = !MDLocation(line: 700,
-// CHECK: [[DBG_F7]] = !MDLocation(line: 800,
-// CHECK: [[DBG_F8]] = !MDLocation(line: 900,
-// CHECK: [[DBG_F9]] = !MDLocation(line: 1000,
-// CHECK: [[DBG_F10_STORE]] = !MDLocation(line: 1100,
-// CHECK: [[DBG_GLBL_CTOR_B]] = !MDLocation(line: 1200,
-// CHECK: [[DBG_GLBL_DTOR_B]] = !MDLocation(line: 1200,
-// CHECK: [[DBG_F11]] = !MDLocation(line: 1300,
-// CHECK: [[DBG_F12]] = !MDLocation(line: 1400,
-// CHECK: [[DBG_F13]] = !MDLocation(line: 1500,
-// CHECK: [[DBG_F14_CTOR_CALL]] = !MDLocation(line: 1600,
-// CHECK: [[DBG_F15]] = !MDLocation(line: 1700,
-// CHECK: [[DBG_F16]] = !MDLocation(line: 1800,
-// CHECK: [[DBG_F17]] = !MDLocation(line: 1900,
-// CHECK: [[DBG_F18_1]] = !MDLocation(line: 2000,
-// CHECK: [[DBG_F18_2]] = !MDLocation(line: 2001,
-// CHECK: [[DBG_F19_1]] = !MDLocation(line: 2100,
-// CHECK: [[DBG_F19_2]] = !MDLocation(line: 2101,
-// CHECK: [[DBG_F20_1]] = !MDLocation(line: 2200,
-// CHECK: [[DBG_F23]] = !MDLocation(line: 2500,
-// CHECK: [[DBG_F24]] = !MDLocation(line: 2600,
+// CHECK: [[DBG_F1]] = !DILocation(line: 100,
+// CHECK: [[DBG_FOO_VALUE]] = !DILocation(line: 200,
+// CHECK: [[DBG_FOO_REF]] = !DILocation(line: 202,
+// CHECK: [[DBG_FOO_COMPLEX]] = !DILocation(line: 204,
+// CHECK: [[DBG_F2]] = !DILocation(line: 300,
+// CHECK: [[DBG_F3]] = !DILocation(line: 400,
+// CHECK: [[DBG_F4]] = !DILocation(line: 500,
+// CHECK: [[DBG_F5]] = !DILocation(line: 600,
+// CHECK: [[DBG_F6]] = !DILocation(line: 700,
+// CHECK: [[DBG_F7]] = !DILocation(line: 800,
+// CHECK: [[DBG_F8]] = !DILocation(line: 900,
+// CHECK: [[DBG_F9]] = !DILocation(line: 1000,
+// CHECK: [[DBG_F10_STORE]] = !DILocation(line: 1100,
+// CHECK: [[DBG_GLBL_CTOR_B]] = !DILocation(line: 1200,
+// CHECK: [[DBG_GLBL_DTOR_B]] = !DILocation(line: 1200,
+// CHECK: [[DBG_F11]] = !DILocation(line: 1300,
+// CHECK: [[DBG_F12]] = !DILocation(line: 1400,
+// CHECK: [[DBG_F13]] = !DILocation(line: 1500,
+// CHECK: [[DBG_F14_CTOR_CALL]] = !DILocation(line: 1600,
+// CHECK: [[DBG_F15]] = !DILocation(line: 1700,
+// CHECK: [[DBG_F16]] = !DILocation(line: 1800,
+// CHECK: [[DBG_F17]] = !DILocation(line: 1900,
+// CHECK: [[DBG_F18_1]] = !DILocation(line: 2000,
+// CHECK: [[DBG_F18_2]] = !DILocation(line: 2001,
+// CHECK: [[DBG_F19_1]] = !DILocation(line: 2100,
+// CHECK: [[DBG_F19_2]] = !DILocation(line: 2101,
+// CHECK: [[DBG_F20_1]] = !DILocation(line: 2200,
+// CHECK: [[DBG_F23]] = !DILocation(line: 2500,
+// CHECK: [[DBG_F24]] = !DILocation(line: 2600,
index 103a40241bef9603992a8cb95838471b9b3fe583..3ce05bd2d6b35e3f8adedc086d2d22ff42c7e942 100644 (file)
@@ -1,16 +1,16 @@
 // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -g %s -o - | FileCheck %s
-// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "A",{{.*}} identifier: "_ZTS1A")
-// CHECK: !MDSubprogram(name: "foo", linkageName: "_ZN1A3fooEiS_3$_0"
+// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A",{{.*}} identifier: "_ZTS1A")
+// CHECK: !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEiS_3$_0"
 // CHECK-SAME:          DIFlagProtected
-// CHECK: ![[THISTYPE:[0-9]+]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A"
+// CHECK: ![[THISTYPE:[0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A"
 // CHECK-SAME:                                  DIFlagArtificial
-// CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type
-// CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[MEMFUNTYPE:[0-9]+]]
-// CHECK: ![[MEMFUNTYPE]] = !MDSubroutineType(types: ![[MEMFUNARGS:[0-9]+]])
+// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type
+// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[MEMFUNTYPE:[0-9]+]]
+// CHECK: ![[MEMFUNTYPE]] = !DISubroutineType(types: ![[MEMFUNARGS:[0-9]+]])
 // CHECK: ![[MEMFUNARGS]] = {{.*}}, ![[THISTYPE]],
-// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable
-// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable
-// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable
+// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable
+// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable
+// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable
 union {
   int a;
   float b;
index 60f861186bdb9f76e657b54ddc5e4a618b0cdd9a..d59b778676c42082e8c75ec44db33a1059b61acf 100644 (file)
@@ -55,59 +55,59 @@ void B::func_fwd() {}
 // This should work even if 'i' and 'func' were declarations & not definitions,
 // but it doesn't yet.
 
-// CHECK: [[CU:![0-9]+]] = !MDCompileUnit(
+// CHECK: [[CU:![0-9]+]] = !DICompileUnit(
 // CHECK-SAME:                            imports: [[MODULES:![0-9]*]]
-// CHECK: [[FOO:![0-9]+]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",
+// CHECK: [[FOO:![0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
 // CHECK-SAME:                               line: 5
 // CHECK-SAME:                               DIFlagFwdDecl
-// CHECK: [[FOOCPP:![0-9]+]] = !MDFile(filename: "foo.cpp"
-// CHECK: [[NS:![0-9]+]] = !MDNamespace(name: "B", scope: [[CTXT:![0-9]+]], file: [[FOOCPP]], line: 1)
-// CHECK: [[CTXT]] = !MDNamespace(name: "A", scope: null, file: [[FILE:![0-9]+]], line: 5)
-// CHECK: [[FILE]] = !MDFile(filename: "{{.*}}debug-info-namespace.cpp",
-// CHECK: [[BAR:![0-9]+]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "bar",
+// CHECK: [[FOOCPP:![0-9]+]] = !DIFile(filename: "foo.cpp"
+// CHECK: [[NS:![0-9]+]] = !DINamespace(name: "B", scope: [[CTXT:![0-9]+]], file: [[FOOCPP]], line: 1)
+// CHECK: [[CTXT]] = !DINamespace(name: "A", scope: null, file: [[FILE:![0-9]+]], line: 5)
+// CHECK: [[FILE]] = !DIFile(filename: "{{.*}}debug-info-namespace.cpp",
+// CHECK: [[BAR:![0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "bar",
 // CHECK-SAME:                               line: 6
 // CHECK-SAME:                               DIFlagFwdDecl
-// CHECK: [[F1:![0-9]+]] = !MDSubprogram(name: "f1",{{.*}} line: 4
+// CHECK: [[F1:![0-9]+]] = !DISubprogram(name: "f1",{{.*}} line: 4
 // CHECK-SAME:                           isDefinition: true
-// CHECK: [[FUNC:![0-9]+]] = !MDSubprogram(name: "func",{{.*}} isDefinition: true
-// CHECK: [[FUNC_FWD:![0-9]+]] = !MDSubprogram(name: "func_fwd",{{.*}} line: 47,{{.*}} isDefinition: true
-// CHECK: [[I:![0-9]+]] = !MDGlobalVariable(name: "i",{{.*}} scope: [[NS]],
-// CHECK: [[VAR_FWD:![0-9]+]] = !MDGlobalVariable(name: "var_fwd",{{.*}} scope: [[NS]],
+// CHECK: [[FUNC:![0-9]+]] = !DISubprogram(name: "func",{{.*}} isDefinition: true
+// CHECK: [[FUNC_FWD:![0-9]+]] = !DISubprogram(name: "func_fwd",{{.*}} line: 47,{{.*}} isDefinition: true
+// CHECK: [[I:![0-9]+]] = !DIGlobalVariable(name: "i",{{.*}} scope: [[NS]],
+// CHECK: [[VAR_FWD:![0-9]+]] = !DIGlobalVariable(name: "var_fwd",{{.*}} scope: [[NS]],
 // CHECK-SAME:                                    line: 44
 // CHECK-SAME:                                    isDefinition: true
 
 // CHECK: [[MODULES]] = !{[[M1:![0-9]+]], [[M2:![0-9]+]], [[M3:![0-9]+]], [[M4:![0-9]+]], [[M5:![0-9]+]], [[M6:![0-9]+]], [[M7:![0-9]+]], [[M8:![0-9]+]], [[M9:![0-9]+]], [[M10:![0-9]+]], [[M11:![0-9]+]], [[M12:![0-9]+]], [[M13:![0-9]+]], [[M14:![0-9]+]], [[M15:![0-9]+]], [[M16:![0-9]+]], [[M17:![0-9]+]]}
-// CHECK: [[M1]] = !MDImportedEntity(tag: DW_TAG_imported_module, scope: [[CTXT]], entity: [[NS]], line: 15)
-// CHECK: [[M2]] = !MDImportedEntity(tag: DW_TAG_imported_module, scope: [[CU]], entity: [[CTXT]],
-// CHECK: [[M3]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, name: "E", scope: [[CU]], entity: [[CTXT]], line: 19)
-// CHECK: [[M4]] = !MDImportedEntity(tag: DW_TAG_imported_module, scope: [[LEX2:![0-9]+]], entity: [[NS]], line: 23)
-// CHECK: [[LEX2]] = distinct !MDLexicalBlock(scope: [[LEX1:![0-9]+]], file: [[FOOCPP]],
-// CHECK: [[LEX1]] = distinct !MDLexicalBlock(scope: [[FUNC]], file: [[FOOCPP]],
-// CHECK: [[M5]] = !MDImportedEntity(tag: DW_TAG_imported_module, scope: [[FUNC]], entity: [[CTXT]],
-// CHECK: [[M6]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FOO:!"_ZTSN1A1B3fooE"]], line: 27)
-// CHECK: [[M7]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAR:!"_ZTSN1A1B3barE"]]
-// CHECK: [[M8]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[F1]]
-// CHECK: [[M9]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[I]]
-// CHECK: [[M10]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAZ:![0-9]+]]
-// CHECK: [[BAZ]] = !MDDerivedType(tag: DW_TAG_typedef, name: "baz", scope: [[NS]], file: [[FOOCPP]],
+// CHECK: [[M1]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[CTXT]], entity: [[NS]], line: 15)
+// CHECK: [[M2]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[CU]], entity: [[CTXT]],
+// CHECK: [[M3]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "E", scope: [[CU]], entity: [[CTXT]], line: 19)
+// CHECK: [[M4]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[LEX2:![0-9]+]], entity: [[NS]], line: 23)
+// CHECK: [[LEX2]] = distinct !DILexicalBlock(scope: [[LEX1:![0-9]+]], file: [[FOOCPP]],
+// CHECK: [[LEX1]] = distinct !DILexicalBlock(scope: [[FUNC]], file: [[FOOCPP]],
+// CHECK: [[M5]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[FUNC]], entity: [[CTXT]],
+// CHECK: [[M6]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FOO:!"_ZTSN1A1B3fooE"]], line: 27)
+// CHECK: [[M7]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAR:!"_ZTSN1A1B3barE"]]
+// CHECK: [[M8]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[F1]]
+// CHECK: [[M9]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[I]]
+// CHECK: [[M10]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAZ:![0-9]+]]
+// CHECK: [[BAZ]] = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", scope: [[NS]], file: [[FOOCPP]],
 // CHECK-SAME:                     baseType: !"_ZTSN1A1B3barE"
-// CHECK: [[M11]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, name: "X", scope: [[FUNC]], entity: [[CTXT]]
-// CHECK: [[M12]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, name: "Y", scope: [[FUNC]], entity: [[M11]]
-// CHECK: [[M13]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_DECL:![0-9]+]]
-// CHECK: [[VAR_DECL]] = !MDGlobalVariable(name: "var_decl", linkageName: "_ZN1A1B8var_declE", scope: [[NS]],{{.*}} line: 8,
-// CHECK: [[M14]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_DECL:![0-9]+]]
-// CHECK: [[FUNC_DECL]] = !MDSubprogram(name: "func_decl",
+// CHECK: [[M11]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "X", scope: [[FUNC]], entity: [[CTXT]]
+// CHECK: [[M12]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "Y", scope: [[FUNC]], entity: [[M11]]
+// CHECK: [[M13]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_DECL:![0-9]+]]
+// CHECK: [[VAR_DECL]] = !DIGlobalVariable(name: "var_decl", linkageName: "_ZN1A1B8var_declE", scope: [[NS]],{{.*}} line: 8,
+// CHECK: [[M14]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_DECL:![0-9]+]]
+// CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func_decl",
 // CHECK-SAME:                          scope: [[NS]], file: [[FOOCPP]], line: 9
-// CHECK: [[M15]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_FWD:![0-9]+]]
-// CHECK: [[M16]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_FWD:![0-9]+]]
-// CHECK: [[M17]] = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: [[CTXT]], entity: [[I]]
+// CHECK: [[M15]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_FWD:![0-9]+]]
+// CHECK: [[M16]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_FWD:![0-9]+]]
+// CHECK: [[M17]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[CTXT]], entity: [[I]]
 
-// CHECK-GMLT: [[CU:![0-9]+]] = !MDCompileUnit(
+// CHECK-GMLT: [[CU:![0-9]+]] = !DICompileUnit(
 // CHECK-GMLT-SAME:                            emissionKind: 2,
 // CHECK-GMLT-SAME:                            imports: [[MODULES:![0-9]+]]
 // CHECK-GMLT: [[MODULES]] = !{}
 
-// CHECK-NOLIMIT: !MDCompositeType(tag: DW_TAG_structure_type, name: "bar",{{.*}} line: 6,
+// CHECK-NOLIMIT: !DICompositeType(tag: DW_TAG_structure_type, name: "bar",{{.*}} line: 6,
 // CHECK-NOLIMIT-NOT:              DIFlagFwdDecl
 // CHECK-NOLIMIT-SAME:             ){{$}}
 
index 4816626452d555981d1014e088f0f06006ab40ce..36baacc6dbeae80e9eabac2048251f82708cc828 100644 (file)
@@ -4,4 +4,4 @@ void foo() {
   decltype(nullptr) t = 0;
 }
 
-// CHECK: !MDBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
+// CHECK: !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
index 90a6614588bbe205cc39652b68ea75d980d5a446..77b4ad2ed89536a7ee46431544a67eeb8d926e03 100644 (file)
@@ -7,5 +7,5 @@ struct T {
 void foo(int (T::*method)()) {}
 
 // A pointer to a member function is a pair of function- and this-pointer.
-// CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type,
+// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type,
 // CHECK-SAME:           size: 128
index 8d3394cc4680915557f80ff6328ee258c2cbb181..9458e1f825ef5e8fd64f8513070737bc7fa9abd2 100644 (file)
@@ -2,35 +2,35 @@
 // Test (r)value and CVR qualifiers on C++11 non-static member functions.
 class A {
 public:
-  // CHECK: !MDSubprogram(name: "l",
+  // CHECK: !DISubprogram(name: "l",
   // CHECK-SAME:          line: [[@LINE+4]]
   // CHECK-SAME:          type: ![[PLSR:[0-9]+]]
   // CHECK-SAME:          flags: DIFlagPublic | DIFlagPrototyped | DIFlagLValueReference,
-  // CHECK: ![[PLSR]] = !MDSubroutineType(flags: DIFlagLValueReference, types: ![[ARGS:[0-9]+]])
+  // CHECK: ![[PLSR]] = !DISubroutineType(flags: DIFlagLValueReference, types: ![[ARGS:[0-9]+]])
   void l() const &;
   // CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]]}
-  // CHECK: ![[THIS]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CONST_A:[0-9]+]]
-  // CHECK: ![[CONST_A]] = !MDDerivedType(tag: DW_TAG_const_type
-  // CHECK: !MDSubprogram(name: "r"
+  // CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CONST_A:[0-9]+]]
+  // CHECK: ![[CONST_A]] = !DIDerivedType(tag: DW_TAG_const_type
+  // CHECK: !DISubprogram(name: "r"
   // CHECK-SAME:          line: [[@LINE+4]]
   // CHECK-SAME:          type: ![[PRSR:[0-9]+]]
   // CHECK-SAME:          flags: DIFlagPublic | DIFlagPrototyped | DIFlagRValueReference,
-  // CHECK: ![[PRSR]] = !MDSubroutineType(flags: DIFlagRValueReference, types: ![[ARGS]])
+  // CHECK: ![[PRSR]] = !DISubroutineType(flags: DIFlagRValueReference, types: ![[ARGS]])
   void r() const &&;
 };
 
 void g() {
   A a;
   // The type of pl is "void (A::*)() const &".
-  // CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "pl",
+  // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "pl",
   // CHECK-SAME:             line: [[@LINE+3]]
   // CHECK-SAME:             type: ![[PL:[0-9]+]]
-  // CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PLSR]]
+  // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PLSR]]
   auto pl = &A::l;
 
-  // CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "pr",
+  // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "pr",
   // CHECK-SAME:             line: [[@LINE+3]]
   // CHECK-SAME:             type: ![[PR:[0-9]+]]
-  // CHECK: !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PRSR]]
+  // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PRSR]]
   auto pr = &A::r;
 }
index 797e170cbeed228baac08eae9ef0ead2aa249d0b..00b5bcc20ad3886e190e78267f7438e7b871d9f6 100644 (file)
@@ -8,5 +8,5 @@ void foo (int &&i)
   printf("%d\n", i);
 }
 
-// CHECK: !MDDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: ![[INT:[0-9]+]])
-// CHECK: ![[INT]] = !MDBasicType(name: "int"
+// CHECK: !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: ![[INT:[0-9]+]])
+// CHECK: ![[INT]] = !DIBasicType(name: "int"
index 9221ff7546b0999b7f3ee699517d9a54c321dd5d..478b7895e4ec595e622315249ec80ca7f6697c70 100644 (file)
@@ -9,31 +9,31 @@ int src();
 void f();
 
 void func() {
-  // CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i"
+  // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
   // CHECK-SAME:               scope: [[IF1:![0-9]*]]
   // CHECK-SAME:               line: [[@LINE+2]]
-  // CHECK: [[IF1]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE+1]])
+  // CHECK: [[IF1]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
   if (int i = src())
     f();
 
-  // CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i"
+  // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
   // CHECK-SAME:               scope: [[IF2:![0-9]*]]
   // CHECK-SAME:               line: [[@LINE+2]]
-  // CHECK: [[IF2]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE+1]])
+  // CHECK: [[IF2]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
   if (int i = src()) {
     f();
   } else
     f();
 
-  // CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i"
+  // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
   // CHECK-SAME:               scope: [[FOR:![0-9]*]]
   // CHECK-SAME:               line: [[@LINE+2]]
-  // CHECK: [[FOR]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE+1]])
+  // CHECK: [[FOR]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
   for (int i = 0;
-  // CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b"
+  // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b"
   // CHECK-SAME:               scope: [[FOR_BODY:![0-9]*]]
   // CHECK-SAME:               line: [[@LINE+6]]
-  // CHECK: [[FOR_BODY]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE-4]])
+  // CHECK: [[FOR_BODY]] = distinct !DILexicalBlock({{.*}}line: [[@LINE-4]])
   // The scope could be located at 'bool b', but LLVM drops line information for
   // scopes anyway, so it's not terribly important.
   // FIXME: change the debug info schema to not include locations of scopes,
@@ -41,32 +41,32 @@ void func() {
        bool b = i != 10; ++i)
     f();
 
-  // CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i"
+  // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
   // CHECK-SAME:               scope: [[FOR:![0-9]*]]
   // CHECK-SAME:               line: [[@LINE+2]]
-  // CHECK: [[FOR]] = distinct !MDLexicalBlock({{.*}}line: [[@LINE+1]])
+  // CHECK: [[FOR]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
   for (int i = 0; i != 10; ++i) {
     // FIXME: Do not include scopes that have only other scopes (and no variables
     // or using declarations) as direct children, they just waste
     // space/relocations/etc.
-    // CHECK: [[FOR_LOOP_INCLUDING_COND:!.*]] = distinct !MDLexicalBlock(scope: [[FOR]],{{.*}} line: [[@LINE-4]])
-    // CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b"
+    // CHECK: [[FOR_LOOP_INCLUDING_COND:!.*]] = distinct !DILexicalBlock(scope: [[FOR]],{{.*}} line: [[@LINE-4]])
+    // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b"
     // CHECK-SAME:               scope: [[FOR_COMPOUND:![0-9]*]]
     // CHECK-SAME:               line: [[@LINE+2]]
-    // CHECK: [[FOR_COMPOUND]] = distinct !MDLexicalBlock(scope: [[FOR_LOOP_INCLUDING_COND]],{{.*}} line: [[@LINE-8]])
+    // CHECK: [[FOR_COMPOUND]] = distinct !DILexicalBlock(scope: [[FOR_LOOP_INCLUDING_COND]],{{.*}} line: [[@LINE-8]])
     bool b = i % 2;
   }
 
   int x[] = {1, 2};
-  // CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "__range"
+  // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "__range"
   // CHECK-SAME:               scope: [[RANGE_FOR:![0-9]*]]
   // CHECK-NOT:                line:
   // CHECK-SAME:               ){{$}}
-  // CHECK: [[RANGE_FOR]] = distinct !MDLexicalBlock({{.*}}, line: [[@LINE+1]])
+  // CHECK: [[RANGE_FOR]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE+1]])
   for (int i : x) {
-    // CHECK: = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i"
+    // CHECK: = !DILocalVariable(tag: DW_TAG_auto_variable, name: "i"
     // CHECK-SAME:               scope: [[RANGE_FOR_BODY:![0-9]*]]
     // CHECK-SAME:               line: [[@LINE-3]]
-    // CHECK: [[RANGE_FOR_BODY]] = distinct !MDLexicalBlock(scope: [[RANGE_FOR]],{{.*}} line: [[@LINE-4]])
+    // CHECK: [[RANGE_FOR_BODY]] = distinct !DILexicalBlock(scope: [[RANGE_FOR]],{{.*}} line: [[@LINE-4]])
   }
 }
index f9d13b7099904d6389200bd58141871644e8abfe..3f8d8e8389306a8877f6ecaac02d271ed0018137 100644 (file)
@@ -7,7 +7,7 @@ namespace A {
 }
 
 // Verify that a is present and mangled.
-// CHECK: !MDSubprogram(name: "a", linkageName: "_ZN1AL1aEi",
+// CHECK: !DISubprogram(name: "a", linkageName: "_ZN1AL1aEi",
 // CHECK-SAME:          line: 4
 // CHECK-SAME:          isDefinition: true
 // CHECK-SAME:          function: i32 (i32)* @_ZN1AL1aEi
index 26f60b301734b2b04e3595d018015f38438bae8b..8e5207d5c30b6d1a7050f276ae41ecd83c67e174 100644 (file)
@@ -33,57 +33,57 @@ int main()
 // why the definition of "a" comes before the declarations while
 // "b" and "c" come after.
 
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "X"{{.*}}, identifier: "_ZTS1X")
-// CHECK: !MDCompositeType(tag: DW_TAG_class_type, name: "C"{{.*}}, identifier: "_ZTS1C")
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "X"{{.*}}, identifier: "_ZTS1X")
+// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "C"{{.*}}, identifier: "_ZTS1C")
 //
-// CHECK: ![[DECL_A:[0-9]+]] = !MDDerivedType(tag: DW_TAG_member, name: "a"
+// CHECK: ![[DECL_A:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "a"
 // CHECK-NOT:                                 size:
 // CHECK-NOT:                                 align:
 // CHECK-NOT:                                 offset:
 // CHECK-SAME:                                flags: DIFlagStaticMember)
 //
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "const_a"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "const_a"
 // CHECK-NOT:            size:
 // CHECK-NOT:            align:
 // CHECK-NOT:            offset:
 // CHECK-SAME:           flags: DIFlagStaticMember,
 // CHECK-SAME:           extraData: i1 true)
 //
-// CHECK: ![[DECL_B:[0-9]+]] = !MDDerivedType(tag: DW_TAG_member, name: "b"
+// CHECK: ![[DECL_B:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "b"
 // CHECK-NOT:                                 size:
 // CHECK-NOT:                                 align:
 // CHECK-NOT:                                 offset:
 // CHECK-SAME:                                flags: DIFlagProtected | DIFlagStaticMember)
 //
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "const_b"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "const_b"
 // CHECK-NOT:            size:
 // CHECK-NOT:            align:
 // CHECK-NOT:            offset:
 // CHECK-SAME:           flags: DIFlagProtected | DIFlagStaticMember,
 // CHECK-SAME:           extraData: float 0x{{.*}})
 //
-// CHECK: ![[DECL_C:[0-9]+]] = !MDDerivedType(tag: DW_TAG_member, name: "c"
+// CHECK: ![[DECL_C:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "c"
 // CHECK-NOT:                                 size:
 // CHECK-NOT:                                 align:
 // CHECK-NOT:                                 offset:
 // CHECK-SAME:                                flags: DIFlagPublic | DIFlagStaticMember)
 //
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "const_c"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "const_c"
 // CHECK-NOT:            size:
 // CHECK-NOT:            align:
 // CHECK-NOT:            offset:
 // CHECK-SAME:           flags: DIFlagPublic | DIFlagStaticMember,
 // CHECK-SAME:           extraData: i32 18)
 //
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "x_a"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "x_a"
 // CHECK-SAME:           flags: DIFlagPublic | DIFlagStaticMember)
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "static_decl_templ<int>"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "static_decl_templ<int>"
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var"
 
-// CHECK: [[NS_X:![0-9]+]] = !MDNamespace(name: "x"
+// CHECK: [[NS_X:![0-9]+]] = !DINamespace(name: "x"
 
 // Test this in an anonymous namespace to ensure the type is retained even when
 // it doesn't get automatically retained by the string type reference machinery.
@@ -94,8 +94,8 @@ struct anon_static_decl_struct {
 }
 
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "anon_static_decl_struct"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "anon_static_decl_var"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "anon_static_decl_struct"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "anon_static_decl_var"
 
 int ref() {
   return anon_static_decl_struct::anon_static_decl_var;
@@ -113,11 +113,11 @@ int static_decl_templ_ref() {
   return static_decl_templ<int>::static_decl_templ_var;
 }
 
-// CHECK: !MDGlobalVariable(name: "a", {{.*}}variable: i32* @_ZN1C1aE, declaration: ![[DECL_A]])
-// CHECK: !MDGlobalVariable(name: "b", {{.*}}variable: i32* @_ZN1C1bE, declaration: ![[DECL_B]])
-// CHECK: !MDGlobalVariable(name: "c", {{.*}}variable: i32* @_ZN1C1cE, declaration: ![[DECL_C]])
+// CHECK: !DIGlobalVariable(name: "a", {{.*}}variable: i32* @_ZN1C1aE, declaration: ![[DECL_A]])
+// CHECK: !DIGlobalVariable(name: "b", {{.*}}variable: i32* @_ZN1C1bE, declaration: ![[DECL_B]])
+// CHECK: !DIGlobalVariable(name: "c", {{.*}}variable: i32* @_ZN1C1cE, declaration: ![[DECL_C]])
 
-// CHECK-NOT: !MDGlobalVariable(name: "anon_static_decl_var"
+// CHECK-NOT: !DIGlobalVariable(name: "anon_static_decl_var"
 
 // Verify that even when a static member declaration is created lazily when
 // creating the definition, the declaration line is that of the canonical
@@ -128,7 +128,7 @@ struct V {
   virtual ~V(); // cause the definition of 'V' to be omitted by no-standalone-debug optimization
   static const int const_va = 42;
 };
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "const_va",
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "const_va",
 // CHECK-SAME:           line: [[@LINE-3]]
 // CHECK-SAME:           extraData: i32 42
 const int V::const_va;
@@ -140,5 +140,5 @@ struct y {
 int y::z;
 }
 
-// CHECK: !MDGlobalVariable(name: "z",
+// CHECK: !DIGlobalVariable(name: "z",
 // CHECK-SAME:              scope: [[NS_X]]
index 8168fd87729d89c579488e0658449aeda2f35ad8..4dadc4f5531ba4d041e9b2c5a05dcb6f9613e171 100644 (file)
@@ -4,20 +4,20 @@
 // type info at all.
 // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -gline-tables-only | FileCheck %s -check-prefix LINES-ONLY
 
-// LINES-ONLY-NOT: !MDCompositeType(tag: DW_TAG_structure_type
+// LINES-ONLY-NOT: !DICompositeType(tag: DW_TAG_structure_type
 
 template <typename T>
 struct a {
 };
 extern template class a<int>;
-// CHECK-NOT: MDCompositeType(tag: DW_TAG_structure_type, name: "a<int>"
+// CHECK-NOT: DICompositeType(tag: DW_TAG_structure_type, name: "a<int>"
 
 template <typename T>
 struct b {
 };
 extern template class b<int>;
 b<int> bi;
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "b<int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "b<int>"
 // CHECK-NOT: DIFlagFwdDecl
 // CHECK-SAME: ){{$}}
 
@@ -27,7 +27,7 @@ struct c {
 };
 extern template class c<int>;
 c<int> ci;
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "c<int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "c<int>"
 // CHECK-SAME: DIFlagFwdDecl
 
 template <typename T>
@@ -36,7 +36,7 @@ struct d {
 };
 extern template class d<int>;
 d<int> di;
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "d<int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "d<int>"
 // CHECK-NOT: DIFlagFwdDecl
 // CHECK-SAME: ){{$}}
 
@@ -52,7 +52,7 @@ e<int> ei;
 // There's no guarantee that the out of line definition will appear before the
 // explicit template instantiation definition, so conservatively emit the type
 // definition here.
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "e<int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "e<int>"
 // CHECK-NOT: DIFlagFwdDecl
 // CHECK-SAME: ){{$}}
 
@@ -65,7 +65,7 @@ template <typename T>
 void f<T>::g() {
 }
 f<int> fi;
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "f<int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "f<int>"
 // CHECK-NOT: DIFlagFwdDecl
 // CHECK-SAME: ){{$}}
 
@@ -77,7 +77,7 @@ template <>
 void g<int>::f();
 extern template class g<int>;
 g<int> gi;
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "g<int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "g<int>"
 // CHECK-NOT: DIFlagFwdDecl
 // CHECK-SAME: ){{$}}
 
@@ -85,7 +85,7 @@ template <typename T>
 struct h {
 };
 template class h<int>;
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "h<int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "h<int>"
 // CHECK-NOT: DIFlagFwdDecl
 // CHECK-SAME: ){{$}}
 
@@ -96,7 +96,7 @@ struct i {
 template<> void i<int>::f();
 extern template class i<int>;
 i<int> ii;
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "i<int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "i<int>"
 // CHECK-NOT: DIFlagFwdDecl
 // CHECK-SAME: ){{$}}
 
@@ -105,7 +105,7 @@ struct j {
 };
 extern template class j<int>;
 j<int> jj;
-// CHECK: MDCompositeType(tag: DW_TAG_structure_type, name: "j<int, int>"
+// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "j<int, int>"
 
 template <typename T>
 struct k {
@@ -113,4 +113,4 @@ struct k {
 template <>
 struct k<int>;
 template struct k<int>;
-// CHECK-NOT: !MDCompositeType(tag: DW_TAG_structure_type, name: "k<int>"
+// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "k<int>"
index cede2853aa898ce9f69d60e4f1c9bb349b8c773c..25daabce21c071171d2c46b8726b1da1cdfcdb86 100644 (file)
@@ -2,7 +2,7 @@
 // This test is for a crash when emitting debug info for not-yet-completed
 // types.
 // Test that we don't actually emit a forward decl for the offending class:
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived<int>"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Derived<int>"
 // CHECK-NOT:              DIFlagFwdDecl
 // CHECK-SAME:             ){{$}}
 // rdar://problem/15931354
index bb5e5abb5a61d84c62927ffdfff73bc1d20a9e2b..2b4930311487f38900951729095b5472b3e56591 100644 (file)
@@ -1,8 +1,8 @@
 // RUN: %clang_cc1 -emit-llvm -fno-standalone-debug -triple %itanium_abi_triple -g %s -o - | FileCheck %s
 
 // Check that this pointer type is TC<int>
-// CHECK: ![[LINE:[0-9]+]] = !MDCompositeType(tag: DW_TAG_class_type, name: "TC<int>"{{.*}}, identifier: "_ZTS2TCIiE")
-// CHECK: !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS2TCIiE"
+// CHECK: ![[LINE:[0-9]+]] = !DICompositeType(tag: DW_TAG_class_type, name: "TC<int>"{{.*}}, identifier: "_ZTS2TCIiE")
+// CHECK: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS2TCIiE"
 
 template<typename T>
 class TC {
index dca32a316aaf3f050e63ff80d8c26ff2cfa2dd95..dee82dce6bed42cf678653da8113eecf276d2fc1 100644 (file)
@@ -16,38 +16,38 @@ inline int add3(int x) {
   return MyClass().add<3>(x); // even though add<3> is ODR used, don't emit it since we don't codegen it
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
 // CHECK-SAME:             elements: [[FOO_MEM:![0-9]*]]
 // CHECK-SAME:             identifier: "_ZTS3foo"
 // CHECK: [[FOO_MEM]] = !{[[FOO_FUNC:![0-9]*]]}
-// CHECK: [[FOO_FUNC]] = !MDSubprogram(name: "func", linkageName: "_ZN3foo4funcEN5outerIS_E5innerE",
+// CHECK: [[FOO_FUNC]] = !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEN5outerIS_E5innerE",
 // CHECK-SAME:                         type: [[FOO_FUNC_TYPE:![0-9]*]]
-// CHECK: [[FOO_FUNC_TYPE]] = !MDSubroutineType(types: [[FOO_FUNC_PARAMS:![0-9]*]])
+// CHECK: [[FOO_FUNC_TYPE]] = !DISubroutineType(types: [[FOO_FUNC_PARAMS:![0-9]*]])
 // CHECK: [[FOO_FUNC_PARAMS]] = !{null, !{{[0-9]*}}, !"[[OUTER_FOO_INNER_ID:.*]]"}
-// CHECK: !{{[0-9]*}} = !MDCompositeType(tag: DW_TAG_structure_type, name: "inner"{{.*}}, identifier: "[[OUTER_FOO_INNER_ID]]")
+// CHECK: !{{[0-9]*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "inner"{{.*}}, identifier: "[[OUTER_FOO_INNER_ID]]")
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "virt<elem>"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "virt<elem>"
 // CHECK-SAME:             elements: [[VIRT_MEM:![0-9]*]]
 // CHECK-SAME:             vtableHolder: !"_ZTS4virtI4elemE"
 // CHECK-SAME:             templateParams: [[VIRT_TEMP_PARAM:![0-9]*]]
 // CHECK-SAME:             identifier: "_ZTS4virtI4elemE"
 // CHECK: [[VIRT_TEMP_PARAM]] = !{[[VIRT_T:![0-9]*]]}
-// CHECK: [[VIRT_T]] = !MDTemplateTypeParameter(name: "T", type: !"_ZTS4elem")
+// CHECK: [[VIRT_T]] = !DITemplateTypeParameter(name: "T", type: !"_ZTS4elem")
 
-// CHECK: [[C:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "MyClass"
+// CHECK: [[C:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "MyClass"
 // CHECK-SAME:                             elements: [[C_MEM:![0-9]*]]
 // CHECK-SAME:                             vtableHolder: !"_ZTS7MyClass"
 // CHECK-SAME:                             identifier: "_ZTS7MyClass")
 // CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_FUNC:![0-9]*]]}
-// CHECK: [[C_VPTR]] = !MDDerivedType(tag: DW_TAG_member, name: "_vptr$MyClass"
+// CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$MyClass"
 
-// CHECK: [[C_FUNC]] = !MDSubprogram(name: "func",{{.*}} line: 7,
+// CHECK: [[C_FUNC]] = !DISubprogram(name: "func",{{.*}} line: 7,
 
-// CHECK: [[ELEM:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "elem"
+// CHECK: [[ELEM:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "elem"
 // CHECK-SAME:                                elements: [[ELEM_MEM:![0-9]*]]
 // CHECK-SAME:                                identifier: "_ZTS4elem"
 // CHECK: [[ELEM_MEM]] = !{[[ELEM_X:![0-9]*]]}
-// CHECK: [[ELEM_X]] = !MDDerivedType(tag: DW_TAG_member, name: "x", scope: !"_ZTS4elem"
+// CHECK: [[ELEM_X]] = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !"_ZTS4elem"
 // CHECK-SAME:                        baseType: !"_ZTS4virtI4elemE"
 
 // Check that the member function template specialization and implicit special
@@ -55,9 +55,9 @@ inline int add3(int x) {
 // didn't appear in the class's member list (C_MEM). This prevents the functions
 // from being added to type units, while still appearing in the type
 // declaration/reference in the compile unit.
-// CHECK: !MDSubprogram(name: "MyClass"
+// CHECK: !DISubprogram(name: "MyClass"
 // CHECK-SAME:          scope: !"_ZTS7MyClass"
-// CHECK: !MDSubprogram(name: "add<2>"
+// CHECK: !DISubprogram(name: "add<2>"
 // CHECK-SAME:          scope: !"_ZTS7MyClass"
 
 template<typename T>
@@ -80,7 +80,7 @@ inline void func() {
 
 outer<foo>::inner x;
 
-// CHECK: !MDGlobalVariable(name: "x",
+// CHECK: !DIGlobalVariable(name: "x",
 // CHECK-SAME:              type: !"[[OUTER_FOO_INNER_ID]]"
 // CHECK-SAME:              variable: %"struct.outer<foo>::inner"* @x
 
index d686b81e260c56afcaededb9fe296657efd89f68..c184f0499686051af0d55586846c5ae9b084a462 100644 (file)
@@ -3,7 +3,7 @@ namespace __pointer_type_imp
 {
   template <class _Tp, class _Dp, bool > struct __pointer_type1 {};
 
-  // CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "__pointer_type1<C, default_delete<C>, false>",
+  // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__pointer_type1<C, default_delete<C>, false>",
   // CHECK-SAME:             templateParams: ![[PARAMS:[0-9]+]]
   // CHECK-SAME:             identifier: "_ZTSN18__pointer_type_imp15__pointer_type1I1C14default_deleteIS1_ELb0EEE"
   template <class _Tp, class _Dp> struct __pointer_type1<_Tp, _Dp, false>
@@ -17,7 +17,7 @@ struct __pointer_type2
   // Test that the bool template type parameter is emitted.
   //
   // CHECK: ![[PARAMS]] = !{!{{.*}}, !{{.*}}, ![[FALSE:[0-9]+]]}
-  // CHECK: ![[FALSE]] = !MDTemplateValueParameter(type: !{{[0-9]+}}, value: i8 0)
+  // CHECK: ![[FALSE]] = !DITemplateValueParameter(type: !{{[0-9]+}}, value: i8 0)
   typedef typename __pointer_type_imp::__pointer_type1<_Tp, _Dp, false>::type type;
 };
 template <class _Tp> struct default_delete {};
index beb03e8e71b70be909815477c4169d81fdd11388..1f249117522a8b92cd45733a2afb6a230bc5cafb 100644 (file)
@@ -15,17 +15,17 @@ void foo (const char *c) {
   str.assign(c, str);
 }
 
-// CHECK: [[BS:.*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "basic_string<char>"
+// CHECK: [[BS:.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "basic_string<char>"
 // CHECK-SAME:                         line: 4
 // CHECK-SAME:                         size: 8, align: 8
-// CHECK: [[TYPE:![0-9]*]] = !MDSubroutineType(types: [[ARGS:.*]])
+// CHECK: [[TYPE:![0-9]*]] = !DISubroutineType(types: [[ARGS:.*]])
 // CHECK: [[ARGS]] = !{!{{.*}}, !{{.*}}, [[P:![0-9]*]], [[R:.*]]}
-// CHECK: [[P]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: [[CON:![0-9]*]]
-// CHECK: [[CON]] = !MDDerivedType(tag: DW_TAG_const_type, baseType: [[CH:![0-9]*]]
-// CHECK: [[CH]] = !MDBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+// CHECK: [[P]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[CON:![0-9]*]]
+// CHECK: [[CON]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: [[CH:![0-9]*]]
+// CHECK: [[CH]] = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
 
-// CHECK: [[R]] = !MDDerivedType(tag: DW_TAG_reference_type, baseType: [[CON2:![0-9]*]]
-// CHECK: [[CON2]] = !MDDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS12basic_stringIcE"
-// CHECK: !MDSubprogram(name: "assign"
+// CHECK: [[R]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[CON2:![0-9]*]]
+// CHECK: [[CON2]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS12basic_stringIcE"
+// CHECK: !DISubprogram(name: "assign"
 // CHECK-SAME:          line: 7
 // CHECK-SAME:          scopeLine: 8
index 306e070ec7b8b9b0f8ad8dbae6544e3ad1833a88..74adef9a5f7aa1f49e00cdff8410bcc7b6ee002e 100644 (file)
 // RUN: %clang -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++11 | FileCheck %s
 
-// CHECK: !MDCompileUnit(
+// CHECK: !DICompileUnit(
 // CHECK-SAME:           retainedTypes: [[RETAIN:![0-9]*]]
 // CHECK: [[EMPTY:![0-9]*]] = !{}
 // CHECK: [[RETAIN]] = !{!{{[0-9]]*}}, [[FOO:![0-9]*]],
 
 
-// CHECK: [[TC:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>"
+// CHECK: [[TC:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>"
 // CHECK-SAME:                              templateParams: [[TCARGS:![0-9]*]]
 // CHECK: [[TCARGS]] = !{[[TCARG1:![0-9]*]], [[TCARG2:![0-9]*]], [[TCARG3:![0-9]*]], [[TCARG4:![0-9]*]], [[TCARG5:![0-9]*]], [[TCARG6:![0-9]*]], [[TCARG7:![0-9]*]]}
 //
-// CHECK: [[TCARG1]] = !MDTemplateTypeParameter(name: "T", type: [[UINT:![0-9]*]])
-// CHECK: [[UINT:![0-9]*]] = !MDBasicType(name: "unsigned int"
-// CHECK: [[TCARG2]] = !MDTemplateValueParameter(type: [[UINT]], value: i32 2)
-// CHECK: [[TCARG3]] = !MDTemplateValueParameter(name: "x", type: [[CINTPTR:![0-9]*]], value: i32* @glb)
-// CHECK: [[CINTPTR]] = !MDDerivedType(tag: DW_TAG_pointer_type, {{.*}}baseType: [[CINT:![0-9]+]]
-// CHECK: [[CINT]] = !MDDerivedType(tag: DW_TAG_const_type, {{.*}}baseType: [[INT:![0-9]+]]
-// CHECK: [[INT]] = !MDBasicType(name: "int"
-// CHECK: [[TCARG4]] = !MDTemplateValueParameter(name: "a", type: [[MEMINTPTR:![0-9]*]], value: i64 8)
-// CHECK: [[MEMINTPTR]] = !MDDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[INT]], {{.*}}extraData: !"_ZTS3foo")
+// CHECK: [[TCARG1]] = !DITemplateTypeParameter(name: "T", type: [[UINT:![0-9]*]])
+// CHECK: [[UINT:![0-9]*]] = !DIBasicType(name: "unsigned int"
+// CHECK: [[TCARG2]] = !DITemplateValueParameter(type: [[UINT]], value: i32 2)
+// CHECK: [[TCARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR:![0-9]*]], value: i32* @glb)
+// CHECK: [[CINTPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, {{.*}}baseType: [[CINT:![0-9]+]]
+// CHECK: [[CINT]] = !DIDerivedType(tag: DW_TAG_const_type, {{.*}}baseType: [[INT:![0-9]+]]
+// CHECK: [[INT]] = !DIBasicType(name: "int"
+// CHECK: [[TCARG4]] = !DITemplateValueParameter(name: "a", type: [[MEMINTPTR:![0-9]*]], value: i64 8)
+// CHECK: [[MEMINTPTR]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[INT]], {{.*}}extraData: !"_ZTS3foo")
 //
 // Currently Clang emits the pointer-to-member-function value, but LLVM doesn't
 // use it (GCC doesn't emit a value for pointers to member functions either - so
 // it's not clear what, if any, format would be acceptable to GDB)
 //
-// CHECK: [[TCARG5]] = !MDTemplateValueParameter(name: "b", type: [[MEMFUNPTR:![0-9]*]], value: { i64, i64 } { i64 ptrtoint (void (%struct.foo*)* @_ZN3foo1fEv to i64), i64 0 })
-// CHECK: [[MEMFUNPTR]] = !MDDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[FTYPE:![0-9]*]], {{.*}}extraData: !"_ZTS3foo")
-// CHECK: [[FTYPE]] = !MDSubroutineType(types: [[FARGS:![0-9]*]])
+// CHECK: [[TCARG5]] = !DITemplateValueParameter(name: "b", type: [[MEMFUNPTR:![0-9]*]], value: { i64, i64 } { i64 ptrtoint (void (%struct.foo*)* @_ZN3foo1fEv to i64), i64 0 })
+// CHECK: [[MEMFUNPTR]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[FTYPE:![0-9]*]], {{.*}}extraData: !"_ZTS3foo")
+// CHECK: [[FTYPE]] = !DISubroutineType(types: [[FARGS:![0-9]*]])
 // CHECK: [[FARGS]] = !{null, [[FARG1:![0-9]*]]}
-// CHECK: [[FARG1]] = !MDDerivedType(tag: DW_TAG_pointer_type,
+// CHECK: [[FARG1]] = !DIDerivedType(tag: DW_TAG_pointer_type,
 // CHECK-SAME:                       baseType: !"_ZTS3foo"
 // CHECK-NOT:                        line:
 // CHECK-SAME:                       size: 64, align: 64
 // CHECK-NOT:                        offset: 0
 // CHECK-SAME:                       DIFlagArtificial
 //
-// CHECK: [[TCARG6]] = !MDTemplateValueParameter(name: "f", type: [[FUNPTR:![0-9]*]], value: void ()* @_ZN3foo1gEv)
-// CHECK: [[FUNPTR]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: [[FUNTYPE:![0-9]*]]
-// CHECK: [[FUNTYPE]] = !MDSubroutineType(types: [[FUNARGS:![0-9]*]])
+// CHECK: [[TCARG6]] = !DITemplateValueParameter(name: "f", type: [[FUNPTR:![0-9]*]], value: void ()* @_ZN3foo1gEv)
+// CHECK: [[FUNPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[FUNTYPE:![0-9]*]]
+// CHECK: [[FUNTYPE]] = !DISubroutineType(types: [[FUNARGS:![0-9]*]])
 // CHECK: [[FUNARGS]] = !{null}
-// CHECK: [[TCARG7]] = !MDTemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[TCARG7_VALS:![0-9]*]])
+// CHECK: [[TCARG7]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[TCARG7_VALS:![0-9]*]])
 // CHECK: [[TCARG7_VALS]] = !{[[TCARG7_1:![0-9]*]], [[TCARG7_2:![0-9]*]], [[TCARG7_3:![0-9]*]]}
-// CHECK: [[TCARG7_1]] = !MDTemplateValueParameter(type: [[INT]], value: i32 1)
-// CHECK: [[TCARG7_2]] = !MDTemplateValueParameter(type: [[INT]], value: i32 2)
-// CHECK: [[TCARG7_3]] = !MDTemplateValueParameter(type: [[INT]], value: i32 3)
+// CHECK: [[TCARG7_1]] = !DITemplateValueParameter(type: [[INT]], value: i32 1)
+// CHECK: [[TCARG7_2]] = !DITemplateValueParameter(type: [[INT]], value: i32 2)
+// CHECK: [[TCARG7_3]] = !DITemplateValueParameter(type: [[INT]], value: i32 3)
 //
 // We could just emit a declaration of 'foo' here, rather than the entire
 // definition (same goes for any time we emit a member (function or data)
 // pointer type)
-// CHECK: [[FOO]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "foo", {{.*}}identifier: "_ZTS3foo")
-// CHECK: !MDSubprogram(name: "f", linkageName: "_ZN3foo1fEv", {{.*}}type: [[FTYPE:![0-9]*]]
+// CHECK: [[FOO]] = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", {{.*}}identifier: "_ZTS3foo")
+// CHECK: !DISubprogram(name: "f", linkageName: "_ZN3foo1fEv", {{.*}}type: [[FTYPE:![0-9]*]]
 //
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "nested",
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "nested",
 // CHECK-SAME:             scope: !"_ZTS2TCIjLj2EXadL_Z3glbEEXadL_ZN3foo1eEEEXadL_ZNS0_1fEvEEXadL_ZNS0_1gEvEEJLi1ELi2ELi3EEE"
 // CHECK-SAME:             identifier: "[[TCNESTED:.*]]")
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "TC<int, -3, nullptr, nullptr, nullptr, nullptr>"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "TC<int, -3, nullptr, nullptr, nullptr, nullptr>"
 // CHECK-SAME:             templateParams: [[TCNARGS:![0-9]*]]
 // CHECK-SAME:             identifier: "[[TCNT:.*]]")
 // CHECK: [[TCNARGS]] = !{[[TCNARG1:![0-9]*]], [[TCNARG2:![0-9]*]], [[TCNARG3:![0-9]*]], [[TCNARG4:![0-9]*]], [[TCNARG5:![0-9]*]], [[TCNARG6:![0-9]*]], [[TCNARG7:![0-9]*]]}
-// CHECK: [[TCNARG1]] = !MDTemplateTypeParameter(name: "T", type: [[INT]])
-// CHECK: [[TCNARG2]] = !MDTemplateValueParameter(type: [[INT]], value: i32 -3)
-// CHECK: [[TCNARG3]] = !MDTemplateValueParameter(name: "x", type: [[CINTPTR]], value: i8 0)
+// CHECK: [[TCNARG1]] = !DITemplateTypeParameter(name: "T", type: [[INT]])
+// CHECK: [[TCNARG2]] = !DITemplateValueParameter(type: [[INT]], value: i32 -3)
+// CHECK: [[TCNARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR]], value: i8 0)
 
 // The interesting null pointer: -1 for member data pointers (since they are
 // just an offset in an object, they can be zero and non-null for the first
 // member)
 
-// CHECK: [[TCNARG4]] = !MDTemplateValueParameter(name: "a", type: [[MEMINTPTR]], value: i64 -1)
+// CHECK: [[TCNARG4]] = !DITemplateValueParameter(name: "a", type: [[MEMINTPTR]], value: i64 -1)
 //
 // In some future iteration we could possibly emit the value of a null member
 // function pointer as '{ i64, i64 } zeroinitializer' as it may be handled
 // naturally from the LLVM CodeGen side once we decide how to handle non-null
 // member function pointers. For now, it's simpler just to emit the 'i8 0'.
 //
-// CHECK: [[TCNARG5]] = !MDTemplateValueParameter(name: "b", type: [[MEMFUNPTR]], value: i8 0)
-// CHECK: [[TCNARG6]] = !MDTemplateValueParameter(name: "f", type: [[FUNPTR]], value: i8 0)
-// CHECK: [[TCNARG7]] = !MDTemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[EMPTY]])
+// CHECK: [[TCNARG5]] = !DITemplateValueParameter(name: "b", type: [[MEMFUNPTR]], value: i8 0)
+// CHECK: [[TCNARG6]] = !DITemplateValueParameter(name: "f", type: [[FUNPTR]], value: i8 0)
+// CHECK: [[TCNARG7]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[EMPTY]])
 
 // FIXME: these parameters should probably be rendered as 'glb' rather than
 // '&glb', since they're references, not pointers.
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "NN<tmpl_impl, &glb, &glb>",
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "NN<tmpl_impl, &glb, &glb>",
 // CHECK-SAME:             templateParams: [[NNARGS:![0-9]*]]
 // CHECK-SAME:             identifier: "[[NNT:.*]]")
 // CHECK: [[NNARGS]] = !{[[NNARG1:![0-9]*]], [[NNARG2:![0-9]*]], [[NNARG3:![0-9]*]]}
-// CHECK: [[NNARG1]] = !MDTemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "tmpl", value: !"tmpl_impl")
-// CHECK: [[NNARG2]] = !MDTemplateValueParameter(name: "lvr", type: [[INTLVR:![0-9]*]], value: i32* @glb)
-// CHECK: [[INTLVR]] = !MDDerivedType(tag: DW_TAG_reference_type, baseType: [[INT]]
-// CHECK: [[NNARG3]] = !MDTemplateValueParameter(name: "rvr", type: [[INTRVR:![0-9]*]], value: i32* @glb)
-// CHECK: [[INTRVR]] = !MDDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: [[INT]]
+// CHECK: [[NNARG1]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "tmpl", value: !"tmpl_impl")
+// CHECK: [[NNARG2]] = !DITemplateValueParameter(name: "lvr", type: [[INTLVR:![0-9]*]], value: i32* @glb)
+// CHECK: [[INTLVR]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[INT]]
+// CHECK: [[NNARG3]] = !DITemplateValueParameter(name: "rvr", type: [[INTRVR:![0-9]*]], value: i32* @glb)
+// CHECK: [[INTRVR]] = !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: [[INT]]
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "PaddingAtEndTemplate<&PaddedObj>"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "PaddingAtEndTemplate<&PaddedObj>"
 // CHECK-SAME:             templateParams: [[PTOARGS:![0-9]*]]
 // CHECK: [[PTOARGS]] = !{[[PTOARG1:![0-9]*]]}
-// CHECK: [[PTOARG1]] = !MDTemplateValueParameter(type: [[CONST_PADDINGATEND_PTR:![0-9]*]], value: %struct.PaddingAtEnd* @PaddedObj)
-// CHECK: [[CONST_PADDINGATEND_PTR]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS12PaddingAtEnd", size: 64, align: 64)
+// CHECK: [[PTOARG1]] = !DITemplateValueParameter(type: [[CONST_PADDINGATEND_PTR:![0-9]*]], value: %struct.PaddingAtEnd* @PaddedObj)
+// CHECK: [[CONST_PADDINGATEND_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS12PaddingAtEnd", size: 64, align: 64)
 
-// CHECK: !MDGlobalVariable(name: "tci",
+// CHECK: !DIGlobalVariable(name: "tci",
 // CHECK-SAME:              type: !"[[TCNESTED]]"
 // CHECK-SAME:              variable: %"struct.TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>::nested"* @tci
 
-// CHECK: !MDGlobalVariable(name: "tcn"
+// CHECK: !DIGlobalVariable(name: "tcn"
 // CHECK-SAME:              type: !"[[TCNT]]"
 // CHECK-SAME:              variable: %struct.TC* @tcn
 
-// CHECK: !MDGlobalVariable(name: "nn"
+// CHECK: !DIGlobalVariable(name: "nn"
 // CHECK-SAME:              type: !"[[NNT]]"
 // CHECK-SAME:              variable: %struct.NN* @nn
 struct foo {
index b15f0ba7953513f4a000d3c23ecd5c5df992d442..935110ffbdcee23ed97dba2c66fa64a0fc6852e3 100644 (file)
@@ -14,7 +14,7 @@ struct C : A, B {
 
 void C::f() { }
 
-// CHECK: !MDSubprogram(linkageName: "_ZThn{{[48]}}_N1C1fEv"
+// CHECK: !DISubprogram(linkageName: "_ZThn{{[48]}}_N1C1fEv"
 // CHECK-SAME:          line: 15
 // CHECK-SAME:          isDefinition: true
 // CHECK-SAME:          ){{$}}
index 009ab041b9ae1ba1505df278af49d209c1807463..0616d724c9f2f26e2ce676da4b96c5ed7a8dc943 100644 (file)
@@ -10,8 +10,8 @@ namespace PR15637 {
   Value<float> f;
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_union_type, name: "Value<float>",
+// CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "Value<float>",
 // CHECK-SAME:             templateParams: [[TTPARAM:![0-9]+]]
 // CHECK-SAME:             identifier: "_ZTSN7PR156375ValueIfEE"
 // CHECK: [[TTPARAM]] = !{[[PARAMS:.*]]}
-// CHECK: [[PARAMS]] = !MDTemplateTypeParameter(name: "T"
+// CHECK: [[PARAMS]] = !DITemplateTypeParameter(name: "T"
index cc1dbdc8e39940438b927c3e373e479ffc08fdc9..a81a560e6280d486fb2da7fef8a8e705cd4b26b5 100644 (file)
@@ -10,11 +10,11 @@ union E {
 
 E e;
 
-// CHECK: !MDCompositeType(tag: DW_TAG_union_type, name: "E"
+// CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "E"
 // CHECK-SAME:             line: 3
 // CHECK-SAME:             size: 32, align: 32
 // CHECK-NOT:              offset:
 // CHECK-SAME:             {{$}}
-// CHECK: !MDSubprogram(name: "bb"{{.*}}, line: 6
-// CHECK: !MDSubprogram(name: "aa"{{.*}}, line: 7
-// CHECK: !MDSubprogram(name: "E"{{.*}}, line: 8
+// CHECK: !DISubprogram(name: "bb"{{.*}}, line: 6
+// CHECK: !DISubprogram(name: "aa"{{.*}}, line: 7
+// CHECK: !DISubprogram(name: "E"{{.*}}, line: 8
index b6e72ae0aa378f208336f06463db1385539debcc..fd6e31d7d5b6ba7ce8471fe4aa33834f8229bee4 100644 (file)
@@ -1,32 +1,32 @@
 // RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -g %s -o - -std=c++11 | FileCheck %s
 // RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -g %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
 // CHECK-SAME:             templateParams: [[TGIARGS:![0-9]*]]
 // CHECK: [[TGIARGS]] = !{[[TGIARG1:![0-9]*]]}
-// CHECK: [[TGIARG1]] = !MDTemplateValueParameter(
+// CHECK: [[TGIARG1]] = !DITemplateValueParameter(
 // CHECK-SAME:                                    type: [[CONST_GUID_PTR:![0-9]*]]
 // CHECK-SAME:                                    value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab
-// CHECK: [[CONST_GUID_PTR]] = !MDDerivedType(tag: DW_TAG_pointer_type
+// CHECK: [[CONST_GUID_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type
 // CHECK-SAME:                                baseType: [[CONST_GUID:![0-9]*]]
 // CHECK-SAME:                                size: 64
 // CHECK-SAME:                                align: 64
-// CHECK: [[CONST_GUID]] = !MDDerivedType(tag: DW_TAG_const_type
+// CHECK: [[CONST_GUID]] = !DIDerivedType(tag: DW_TAG_const_type
 // CHECK-SAME:                            baseType: [[GUID:![0-9]*]]
-// CHECK: [[GUID]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "_GUID"
+// CHECK: [[GUID]] = !DICompositeType(tag: DW_TAG_structure_type, name: "_GUID"
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
 // CHECK-SAME:             templateParams: [[TGI2ARGS:![0-9]*]]
 // CHECK: [[TGI2ARGS]] = !{[[TGI2ARG1:![0-9]*]]}
-// CHECK: [[TGI2ARG1]] = !MDTemplateValueParameter(
+// CHECK: [[TGI2ARG1]] = !DITemplateValueParameter(
 // CHECK-SAME:                                     type: [[CONST_GUID_REF:![0-9]*]]
 // CHECK-SAME:                                     value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab
-// CHECK: [[CONST_GUID_REF]] = !MDDerivedType(tag: DW_TAG_reference_type,
+// CHECK: [[CONST_GUID_REF]] = !DIDerivedType(tag: DW_TAG_reference_type,
 // CHECK-SAME:                                baseType: [[CONST_GUID:![0-9]*]]
 
-// CHECK-ITANIUM: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
+// CHECK-ITANIUM: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
 // CHECK-ITANIUM-SAME:             identifier: "_ZTS9tmpl_guidIXadu8__uuidoft4uuidEE"
-// CHECK-ITANIUM: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
+// CHECK-ITANIUM: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
 // CHECK-ITANIUM-SAME:             identifier: "_ZTS10tmpl_guid2IXu8__uuidoft4uuidEE"
 
 struct _GUID;
index e51681e791d982c672a3f2b0fba2c064847a1f2e..edcb0e5a53d4ddc374bbe0d0613cd72b0679dbac 100644 (file)
@@ -2,27 +2,27 @@
 
 struct A
 {
-  // CHECK: !MDSubprogram(name: "a", linkageName: "_ZN1A1aEiz"
+  // CHECK: !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz"
   // CHECK-SAME:          line: [[@LINE+2]]
   // CHECK-SAME:          type: ![[ATY:[0-9]+]]
   void a(int c, ...) {}
-  // CHECK: ![[ATY]] = !MDSubroutineType(types: ![[AARGS:[0-9]+]])
+  // CHECK: ![[ATY]] = !DISubroutineType(types: ![[AARGS:[0-9]+]])
   // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic.
   // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null}
 };
 
-  // CHECK: !MDSubprogram(name: "b", linkageName: "_Z1biz"
+  // CHECK: !DISubprogram(name: "b", linkageName: "_Z1biz"
   // CHECK-SAME:          line: [[@LINE+2]]
   // CHECK-SAME:          type: ![[BTY:[0-9]+]]
 void b(int c, ...) {
-  // CHECK: ![[BTY]] = !MDSubroutineType(types: ![[BARGS:[0-9]+]])
+  // CHECK: ![[BTY]] = !DISubroutineType(types: ![[BARGS:[0-9]+]])
   // CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null}
 
   A a;
 
-  // CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "fptr"
+  // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "fptr"
   // CHECK-SAME:             line: [[@LINE+2]]
   // CHECK-SAME:             type: ![[PST:[0-9]+]]
   void (*fptr)(int, ...) = b;
-  // CHECK: ![[PST]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: ![[BTY]],
+  // CHECK: ![[PST]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[BTY]],
 }
index cf2e60e21581fb7a72ccfe8b67ab53051531132b..f15571eab9961979f8d8914ad25353044147eb5b 100644 (file)
@@ -5,7 +5,7 @@
 // module that has its vtable" optimization is disabled by default on
 // Darwin and FreeBSD.
 //
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "lost"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "lost"
 class A
 {
   virtual bool f() = 0;
index da7ce7f0061e8addc1210d3cfff2f47863772a58..bb01f575c59168e017abfb7fca70faddb379c932 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -emit-llvm -g %s -o -| FileCheck %s
 void foo() {
-// CHECK: !MDBasicType(name: "wchar_t"
+// CHECK: !DIBasicType(name: "wchar_t"
   const wchar_t w = L'x';
 }
index 8233be7067280493e894e50640a2f1d1870633d5..2f425fdd5beaacdc6c9755069783adba38e5b502 100644 (file)
@@ -18,5 +18,5 @@ template struct AB<int>;
 // CHECK: call {{.*}}@"\01??_G?$AB@H@@UAEPAXI@Z"({{.*}}) #{{[0-9]*}}, !dbg [[THUNK_LOC:![0-9]*]]
 // CHECK-LABEL: define
 
-// CHECK: [[THUNK_VEC_DEL_DTOR:![0-9]*]] = !MDSubprogram({{.*}}function: {{.*}}@"\01??_E?$AB@H@@W3AEPAXI@Z"
-// CHECK: [[THUNK_LOC]] = !MDLocation(line: 15, scope: [[THUNK_VEC_DEL_DTOR]])
+// CHECK: [[THUNK_VEC_DEL_DTOR:![0-9]*]] = !DISubprogram({{.*}}function: {{.*}}@"\01??_E?$AB@H@@W3AEPAXI@Z"
+// CHECK: [[THUNK_LOC]] = !DILocation(line: 15, scope: [[THUNK_VEC_DEL_DTOR]])
index cc3206e8fdd01bdff7244dd3e6e5e91022b52624..dc7558aa39350bacc2c936c9567eef831c1eb617 100644 (file)
@@ -6,11 +6,11 @@ class A {
 };
 A a;
 
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "x"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "x"
 // CHECK-SAME:           baseType: [[ARRAY_TYPE:![0-9]+]]
-// CHECK: [[ARRAY_TYPE]] = !MDCompositeType(tag: DW_TAG_array_type,
+// CHECK: [[ARRAY_TYPE]] = !DICompositeType(tag: DW_TAG_array_type,
 // CHECK-NOT:                               size:
 // CHECK-SAME:                              align: 32
 // CHECK-SAME:                              elements: [[ELEM_TYPE:![0-9]+]]
 // CHECK: [[ELEM_TYPE]] = !{[[SUBRANGE:.*]]}
-// CHECK: [[SUBRANGE]] = !MDSubrange(count: -1)
+// CHECK: [[SUBRANGE]] = !DISubrange(count: -1)
index bcd78cb7144622b737aad3d0324d8dd109f7dc1f..13753684800a23eaec6f64bd4086c1365121b476 100644 (file)
@@ -56,7 +56,7 @@ namespace VirtualBase {
 // CHECK: define void @_ZN7pr147634funcENS_3fooE
 // CHECK: call void @llvm.dbg.declare({{.*}}, metadata ![[F:.*]], metadata ![[EXPR:.*]])
 
-// MSVC: [[VBASE_B:![0-9]+]] = distinct !MDCompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: 49
+// MSVC: [[VBASE_B:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: 49
 // MSVC-SAME:                                            size: 96, align: 32
 // MSVC-NOT:                                             offset:
 // MSVC-NOT:                                             DIFlagFwdDecl
@@ -64,10 +64,10 @@ namespace VirtualBase {
 // MSVC: [[VBASE_B_DEF]] = !{[[VBASE_A_IN_B:![0-9]+]],
 //
 // Look for the vbtable offset of A, which should be 4.
-// MSVC: [[VBASE_A_IN_B]] = !MDDerivedType(tag: DW_TAG_inheritance, scope: [[VBASE_B]],
+// MSVC: [[VBASE_A_IN_B]] = !DIDerivedType(tag: DW_TAG_inheritance, scope: [[VBASE_B]],
 // MSVC-SAME:                              baseType: !{{[0-9]*}}
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: 49,
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: 49,
 // CHECK-SAME:             size: 128, align: 64,
 // CHECK-NOT:              offset:
 // CHECK-NOT:              DIFlagFwdDecl
@@ -75,7 +75,7 @@ namespace VirtualBase {
 // CHECK: [[VBASE_B_DEF]] = !{[[VBASE_A_IN_B:![0-9]+]],
 //
 // Look for the vtable offset offset, which should be -24.
-// CHECK: [[VBASE_A_IN_B]] = !MDDerivedType(tag: DW_TAG_inheritance
+// CHECK: [[VBASE_A_IN_B]] = !DIDerivedType(tag: DW_TAG_inheritance
 // CHECK-SAME:                              scope: !"_ZTSN11VirtualBase1BE"
 // CHECK-SAME:                              baseType: !"_ZTSN11VirtualBase1AE"
 // CHECK-SAME:                              offset: 24,
@@ -100,21 +100,21 @@ foo func(foo f) {
   return f; // reference 'f' for now because otherwise we hit another bug
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
 // CHECK-SAME:             scope: [[PR14763:![0-9]+]]
 // CHECK-SAME:             identifier: "[[FOO:.*]]"
-// CHECK: [[PR14763]] = !MDNamespace(name: "pr14763"
-// CHECK: [[INCTYPE:![0-9]*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "incomplete"
+// CHECK: [[PR14763]] = !DINamespace(name: "pr14763"
+// CHECK: [[INCTYPE:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "incomplete"
 // CHECK-SAME:                                   DIFlagFwdDecl
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "a"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "a"
 // CHECK-SAME:             elements: [[A_MEM:![0-9]+]]
 // CHECK-SAME:             identifier: "_ZTSN7pr162141aE"
 // CHECK: [[A_MEM]] = !{[[A_I:![0-9]*]]}
-// CHECK: [[A_I]] = !MDDerivedType(tag: DW_TAG_member, name: "i"
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "b"
+// CHECK: [[A_I]] = !DIDerivedType(tag: DW_TAG_member, name: "i"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "b"
 // CHECK-SAME:             DIFlagFwdDecl
 
-// CHECK: [[FUNC:![0-9]+]] = !MDSubprogram(name: "func", linkageName: "_ZN7pr147634funcENS_3fooE"
+// CHECK: [[FUNC:![0-9]+]] = !DISubprogram(name: "func", linkageName: "_ZN7pr147634funcENS_3fooE"
 // CHECK-SAME:                             type: [[FUNC_TYPE:![0-9]*]]
 // CHECK-SAME:                             isDefinition: true
 }
@@ -124,16 +124,16 @@ void foo() {
   wchar_t d = c;
 }
 
-// CHECK-NOT: !MDGlobalVariable(name: "c"
+// CHECK-NOT: !DIGlobalVariable(name: "c"
 
 namespace pr9608 { // also pr9600
 struct incomplete;
 incomplete (*x)[3];
-// CHECK: !MDGlobalVariable(name: "x", linkageName: "_ZN6pr96081xE"
+// CHECK: !DIGlobalVariable(name: "x", linkageName: "_ZN6pr96081xE"
 // CHECK-SAME:              type: [[INCARRAYPTR:![0-9]*]]
 // CHECK-SAME:              variable: [3 x i8]** @_ZN6pr96081xE
-// CHECK: [[INCARRAYPTR]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: [[INCARRAY:![0-9]+]]
-// CHECK: [[INCARRAY]] = !MDCompositeType(tag: DW_TAG_array_type
+// CHECK: [[INCARRAYPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[INCARRAY:![0-9]+]]
+// CHECK: [[INCARRAY]] = !DICompositeType(tag: DW_TAG_array_type
 // CHECK-NOT:                             line:
 // CHECK-NOT:                             size:
 // CHECK-NOT:                             align:
@@ -142,11 +142,11 @@ incomplete (*x)[3];
 }
 
 // For some reason function arguments ended up down here
-// CHECK: ![[F]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "f", arg: 1, scope: [[FUNC]]
+// CHECK: ![[F]] = !DILocalVariable(tag: DW_TAG_arg_variable, name: "f", arg: 1, scope: [[FUNC]]
 // CHECK-SAME:                      type: !"[[FOO]]"
-// CHECK: ![[EXPR]] = !MDExpression(DW_OP_deref)
+// CHECK: ![[EXPR]] = !DIExpression(DW_OP_deref)
 
-// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "c"
+// CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "c"
 
 namespace pr16214 {
 struct a {
index 88951c720335bc9df6111b0c667384b2963b3a4a..a53274af3435045c8697be48771293412fb1f803 100644 (file)
@@ -15,88 +15,88 @@ struct D { D(); D(const D&); int x; };
 int d(int x) { D y[10]; return [x,y] { return y[x].x; }(); }
 
 // Randomness for file. -- 6
-// CHECK: [[FILE:.*]] = !MDFile(filename: "{{.*}}debug-lambda-expressions.cpp",
+// CHECK: [[FILE:.*]] = !DIFile(filename: "{{.*}}debug-lambda-expressions.cpp",
 
-// CHECK: ![[INT:[0-9]+]] = !MDBasicType(name: "int"
+// CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
 
 // A: 10
-// CHECK: ![[A_FUNC:.*]] = !MDSubprogram(name: "a"{{.*}}, line: [[A_LINE:[0-9]+]]{{.*}}, isDefinition: true
+// CHECK: ![[A_FUNC:.*]] = !DISubprogram(name: "a"{{.*}}, line: [[A_LINE:[0-9]+]]{{.*}}, isDefinition: true
 
 // B: 14
-// CHECK: ![[B_FUNC:.*]] = !MDSubprogram(name: "b"{{.*}}, line: [[B_LINE:[0-9]+]]{{.*}}, isDefinition: true
+// CHECK: ![[B_FUNC:.*]] = !DISubprogram(name: "b"{{.*}}, line: [[B_LINE:[0-9]+]]{{.*}}, isDefinition: true
 
 // C: 17
-// CHECK: ![[C_FUNC:.*]] = !MDSubprogram(name: "c"{{.*}}, line: [[C_LINE:[0-9]+]]{{.*}}, isDefinition: true
+// CHECK: ![[C_FUNC:.*]] = !DISubprogram(name: "c"{{.*}}, line: [[C_LINE:[0-9]+]]{{.*}}, isDefinition: true
 
 // D: 18
-// CHECK: ![[D_FUNC:.*]] = !MDSubprogram(name: "d"{{.*}}, line: [[D_LINE:[0-9]+]]{{.*}}, isDefinition: true
+// CHECK: ![[D_FUNC:.*]] = !DISubprogram(name: "d"{{.*}}, line: [[D_LINE:[0-9]+]]{{.*}}, isDefinition: true
 
 
 // Back to A. -- 78
-// CHECK: ![[LAM_A:.*]] = !MDCompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[A_FUNC]]{{.*}}, line: [[A_LINE]],
+// CHECK: ![[LAM_A:.*]] = !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[A_FUNC]]{{.*}}, line: [[A_LINE]],
 // CHECK-SAME:                             elements: ![[LAM_A_ARGS:[0-9]+]]
 // CHECK: ![[LAM_A_ARGS]] = !{![[CON_LAM_A:[0-9]+]]}
-// CHECK: ![[CON_LAM_A]] = !MDSubprogram(name: "operator()"
+// CHECK: ![[CON_LAM_A]] = !DISubprogram(name: "operator()"
 // CHECK-SAME:                           scope: ![[LAM_A]]
 // CHECK-SAME:                           line: [[A_LINE]]
 // CHECK-SAME:                           DIFlagPublic
 
 // Back to B. -- 67
-// CHECK: ![[LAM_B:.*]] = !MDCompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[B_FUNC]]{{.*}}, line: [[B_LINE]],
+// CHECK: ![[LAM_B:.*]] = !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[B_FUNC]]{{.*}}, line: [[B_LINE]],
 // CHECK-SAME:                             elements: ![[LAM_B_ARGS:[0-9]+]]
 // CHECK: ![[LAM_B_ARGS]] = !{![[CAP_B:[0-9]+]], ![[CON_LAM_B:[0-9]+]]}
-// CHECK: ![[CAP_B]] = !MDDerivedType(tag: DW_TAG_member, name: "x"
+// CHECK: ![[CAP_B]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
 // CHECK-SAME:                        scope: ![[LAM_B]]
 // CHECK-SAME:                        line: [[B_LINE]],
 // CHECK-SAME:                        baseType: ![[INT]]
-// CHECK: ![[CON_LAM_B]] = !MDSubprogram(name: "operator()"
+// CHECK: ![[CON_LAM_B]] = !DISubprogram(name: "operator()"
 // CHECK-SAME:                           scope: ![[LAM_B]]
 // CHECK-SAME:                           line: [[B_LINE]]
 // CHECK-SAME:                           DIFlagPublic
 
 // Back to C. -- 55
-// CHECK: ![[LAM_C:.*]] = !MDCompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[C_FUNC]]{{.*}}, line: [[C_LINE]],
+// CHECK: ![[LAM_C:.*]] = !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[C_FUNC]]{{.*}}, line: [[C_LINE]],
 // CHECK-SAME:                             elements: ![[LAM_C_ARGS:[0-9]+]]
 // CHECK: ![[LAM_C_ARGS]] = !{![[CAP_C:[0-9]+]], ![[CON_LAM_C:[0-9]+]]}
-// CHECK: ![[CAP_C]] = !MDDerivedType(tag: DW_TAG_member, name: "x"
+// CHECK: ![[CAP_C]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
 // CHECK-SAME:                        scope: ![[LAM_C]]
 // CHECK-SAME:                        line: [[C_LINE]],
 // CHECK-SAME:                        baseType: ![[TYPE_C_x:[0-9]+]]
-// CHECK: ![[TYPE_C_x]] = !MDDerivedType(tag: DW_TAG_reference_type, baseType: ![[INT]]
-// CHECK: ![[CON_LAM_C]] = !MDSubprogram(name: "operator()"
+// CHECK: ![[TYPE_C_x]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: ![[INT]]
+// CHECK: ![[CON_LAM_C]] = !DISubprogram(name: "operator()"
 // CHECK-SAME:                           scope: ![[LAM_C]]
 // CHECK-SAME:                           line: [[C_LINE]]
 // CHECK-SAME:                           DIFlagPublic
 
 // Back to D. -- 24
-// CHECK: ![[LAM_D:.*]] = !MDCompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[D_FUNC]]{{.*}}, line: [[D_LINE]],
+// CHECK: ![[LAM_D:.*]] = !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[D_FUNC]]{{.*}}, line: [[D_LINE]],
 // CHECK-SAME:                             elements: ![[LAM_D_ARGS:[0-9]+]]
 // CHECK: ![[LAM_D_ARGS]] = !{![[CAP_D_X:[0-9]+]], ![[CAP_D_Y:[0-9]+]], ![[CON_LAM_D:[0-9]+]]}
-// CHECK: ![[CAP_D_X]] = !MDDerivedType(tag: DW_TAG_member, name: "x"
+// CHECK: ![[CAP_D_X]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
 // CHECK-SAME:                          scope: ![[LAM_D]]
 // CHECK-SAME:                          line: [[D_LINE]],
-// CHECK: ![[CAP_D_Y]] = !MDDerivedType(tag: DW_TAG_member, name: "y"
+// CHECK: ![[CAP_D_Y]] = !DIDerivedType(tag: DW_TAG_member, name: "y"
 // CHECK-SAME:                          scope: ![[LAM_D]]
 // CHECK-SAME:                          line: [[D_LINE]],
-// CHECK: ![[CON_LAM_D]] = !MDSubprogram(name: "operator()"
+// CHECK: ![[CON_LAM_D]] = !DISubprogram(name: "operator()"
 // CHECK-SAME:                           scope: ![[LAM_D]]
 // CHECK-SAME:                           line: [[D_LINE]]
 // CHECK-SAME:                           DIFlagPublic
 
 // CVAR:
-// CHECK: !MDGlobalVariable(name: "cvar"
+// CHECK: !DIGlobalVariable(name: "cvar"
 // CHECK-SAME:              line: [[CVAR_LINE:[0-9]+]]
 // CHECK-SAME:              type: ![[CVAR_T:[0-9]+]]
-// CHECK: ![[CVAR_T]] = !MDCompositeType(tag: DW_TAG_class_type
+// CHECK: ![[CVAR_T]] = !DICompositeType(tag: DW_TAG_class_type
 // CHECK-SAME:                           line: [[CVAR_LINE]],
 // CHECK-SAME:                           elements: ![[CVAR_ARGS:[0-9]+]]
 // CHECK: ![[CVAR_ARGS]] = !{!{{[0-9]+}}}
 
 // VAR:
-// CHECK: !MDGlobalVariable(name: "var"
+// CHECK: !DIGlobalVariable(name: "var"
 // CHECK-SAME:              line: [[VAR_LINE:[0-9]+]]
 // CHECK-SAME:              type: ![[VAR_T:[0-9]+]]
-// CHECK: ![[VAR_T]] = !MDCompositeType(tag: DW_TAG_class_type
+// CHECK: ![[VAR_T]] = !DICompositeType(tag: DW_TAG_class_type
 // CHECK-SAME:                          line: [[VAR_LINE]],
 // CHECK-SAME:                          elements: ![[VAR_ARGS:[0-9]+]]
 // CHECK: ![[VAR_ARGS]] = !{!{{[0-9]+}}}
index 891470dcdbaf35317113d1173970e8120fb950a8..e3ef67091701ab02bee5ab40d0ddfdab80eef4a7 100644 (file)
@@ -12,10 +12,10 @@ int D::d(int x) {
   }();
 }
 
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "this",
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "this",
 // CHECK-SAME:           line: 11
 // CHECK-SAME:           baseType: ![[POINTER:[0-9]+]]
 // CHECK-SAME:           size: 64, align: 64
 // CHECK-NOT:            offset: 0
 // CHECK-SAME:           ){{$}}
-// CHECK: ![[POINTER]] = !MDDerivedType(tag: DW_TAG_pointer_type
+// CHECK: ![[POINTER]] = !DIDerivedType(tag: DW_TAG_pointer_type
index a8abfded2c224e300e61d3c40390d2d0cd696a0c..2534364aa4c4b01c21e31a9709946a22cdf059d2 100644 (file)
@@ -19,4 +19,4 @@ void foo() {
   }
 }
 // Check there is a line number entry for line 19 where b1 is destructed.
-// CHECK: !MDLocation(line: 19,
+// CHECK: !DILocation(line: 19,
index 23a27d325ceb9099ada1bf22048795b76ec39b4c..38c06f16ade34f04fb3a664f33f3f73e334d2b28 100644 (file)
@@ -1,10 +1,10 @@
 // RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
 
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "p"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "p"
 // CHECK-SAME:           baseType: ![[INT:[0-9]+]]
 // CHECK-SAME:           DIFlagPublic
-// CHECK: ![[INT]] = !MDBasicType(name: "int"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "pr"
+// CHECK: ![[INT]] = !DIBasicType(name: "int"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "pr"
 // CHECK-NOT:            flags:
 // CHECK-SAME:           baseType: ![[INT]]
 
index 69ff77ae91ffada9f6d892f4079d04bf2df0d813..813a890ae5b6d7b28ed5b28b9ab70a7ec55da41e 100644 (file)
@@ -6,11 +6,11 @@
 //
 // CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp
 // CHECK: !dbg ![[DBG:.*]]
-// CHECK: !MDSubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
+// CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
 // CHECK-NOT:           line:
 // CHECK-SAME:          isLocal: true
 // CHECK-SAME:          isDefinition: true
-// CHECK: ![[DBG]] = !MDLocation(line: 0,
+// CHECK: ![[DBG]] = !DILocation(line: 0,
 # 99 "someheader.h"
 class A {
 public:
index db8216b49964a61b48fc68c31bf2f03c0545863f..af9a5360674a094779d624056b5679edf9929489 100644 (file)
@@ -5,7 +5,7 @@ struct __declspec(dllexport) s {
   static const unsigned int ui = 0;
 };
 
-// CHECK: ![[SCOPE:[0-9]+]] = !MDCompileUnit(
-// CHECK: !MDGlobalVariable(name: "ui", linkageName: "_ZN1s2uiE", scope: ![[SCOPE]],
+// CHECK: ![[SCOPE:[0-9]+]] = !DICompileUnit(
+// CHECK: !DIGlobalVariable(name: "ui", linkageName: "_ZN1s2uiE", scope: ![[SCOPE]],
 // CHECK-SAME:              variable: i32* @_ZN1s2uiE
 
index 67ceecb04ae6975896400f5d786d78114dfe2837..99aa814a9332d5eb465fafcb571fc980bf998479 100644 (file)
@@ -25,13 +25,13 @@ int foo()
   c.i = 42;
   return 0;
   // This breakpoint should be at/before the cleanup code.
-  // CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
 
 void bar()
 {
   if (!foo())
-    // CHECK: {{.*}} = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+    // CHECK: {{.*}} = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
     return;
 
   if (foo()) {
@@ -39,21 +39,21 @@ void bar()
     c.i = foo();
   }
   // Clang creates only a single ret instruction. Make sure it is at a useful line.
-  // CHECK: ![[RETBAR]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RETBAR]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
 
 void baz()
 {
   if (!foo())
-    // CHECK: ![[SCOPE1:.*]] = distinct !MDLexicalBlock({{.*}}, line: [[@LINE-1]])
-    // CHECK: {{.*}} = !MDLocation(line: [[@LINE+1]], scope: ![[SCOPE1]])
+    // CHECK: ![[SCOPE1:.*]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE-1]])
+    // CHECK: {{.*}} = !DILocation(line: [[@LINE+1]], scope: ![[SCOPE1]])
     return;
 
   if (foo()) {
     // no cleanup
-    // CHECK: {{.*}} = !MDLocation(line: [[@LINE+2]], scope: ![[SCOPE2:.*]])
-    // CHECK: ![[SCOPE2]] = distinct !MDLexicalBlock({{.*}}, line: [[@LINE-3]])
+    // CHECK: {{.*}} = !DILocation(line: [[@LINE+2]], scope: ![[SCOPE2:.*]])
+    // CHECK: ![[SCOPE2]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE-3]])
     return;
   }
-  // CHECK: ![[RETBAZ]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RETBAZ]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
index 036cfecffe4371d4374ad9fb6e905e89f3cbf729..219aab1bf54bf94ecc0f49d455bd22489c44e314 100644 (file)
 // CHECK-NEXT: cleanup, !dbg ![[DBG3:.*]]
 // CHECK-DAG: ![[CURRENT_ADDR]] = {{.*}}name: "current_address"
 // CHECK-DAG: ![[FOUND_IT]] = {{.*}}name: "found_it"
-// CHECK-DAG: ![[DBG1]] = !MDLocation(line: 256,
-// CHECK-DAG: ![[DBG2]] = !MDLocation(line: 257,
-// CHECK-DAG: ![[DBG3]] = !MDLocation(line: 268,
-// CHECK-DAG: ![[DBG4]] = !MDLocation(line: 256,
+// CHECK-DAG: ![[DBG1]] = !DILocation(line: 256,
+// CHECK-DAG: ![[DBG2]] = !DILocation(line: 257,
+// CHECK-DAG: ![[DBG3]] = !DILocation(line: 268,
+// CHECK-DAG: ![[DBG4]] = !DILocation(line: 256,
 typedef unsigned long long uint64_t;
 template<class _Tp> class shared_ptr {
 public:
index f579de13d5328da3bf082d70075f5efe96fe999b..1f752ff0b4ec93cf5fd399bd0cac2dc24c603c9d 100644 (file)
@@ -4,12 +4,12 @@
 // CHECK: define{{.*}}bar
 // CHECK-NOT: define
 // CHECK: ret {{.*}}, !dbg [[DBG:.*]]
-// CHECK: [[HPP:.*]] = !MDFile(filename: "./template.hpp",
-// CHECK: [[SP:.*]] = !MDSubprogram(name: "bar",
+// CHECK: [[HPP:.*]] = !DIFile(filename: "./template.hpp",
+// CHECK: [[SP:.*]] = !DISubprogram(name: "bar",
 // CHECK-SAME:                      file: [[HPP]], line: 22
 // CHECK-SAME:                      isDefinition: true
 // We shouldn't need a lexical block for this function.
-// CHECK: [[DBG]] = !MDLocation(line: 23, scope: [[SP]])
+// CHECK: [[DBG]] = !DILocation(line: 23, scope: [[SP]])
 
 
 # 1 "./template.h" 1
index 0838dd586a76562f5bbe80bb71076f13a104d7d8..c16c5e354b5ca330ba5c64c6f0cde670f65fdc97 100644 (file)
@@ -17,7 +17,7 @@ void Derived::VariadicFunction(...) { }
 //
 // CHECK: !llvm.dbg.cu = !{![[CU:[0-9]+]]}
 //
-// CHECK: ![[CU]] = !MDCompileUnit({{.*}} subprograms: ![[SPs:[0-9]+]]
+// CHECK: ![[CU]] = !DICompileUnit({{.*}} subprograms: ![[SPs:[0-9]+]]
 // CHECK: ![[SPs]] = !{![[SP:[0-9]+]]}
-// CHECK: ![[SP]] = !MDSubprogram(name: "VariadicFunction",{{.*}} function: {{[^:]+}} @_ZN7Derived16VariadicFunctionEz
-// CHECK: ![[LOC]] = !MDLocation({{.*}}scope: ![[SP]])
+// CHECK: ![[SP]] = !DISubprogram(name: "VariadicFunction",{{.*}} function: {{[^:]+}} @_ZN7Derived16VariadicFunctionEz
+// CHECK: ![[LOC]] = !DILocation({{.*}}scope: ![[SP]])
index c81191b9fedd1092f1418a40788e861ac95630f7..7f1d2214d8fc944954e088ead843cd1089302e22 100644 (file)
@@ -4,7 +4,7 @@
 // CHECK: ret i32
 // CHECK: landingpad {{.*}}
 // CHECK-NEXT: !dbg ![[LPAD:[0-9]+]]
-// CHECK: ![[LPAD]] = !MDLocation(line: 24, scope: !{{.*}})
+// CHECK: ![[LPAD]] = !DILocation(line: 24, scope: !{{.*}})
 
 # 1 "/usr/include/c++/4.2.1/vector" 1 3
 typedef long unsigned int __darwin_size_t;
index 18f427802b713dbe4df5bb8d88f593733b6a3d60..52658fc28d74a1bf496e01282946b69008b48ef2 100644 (file)
@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 -std=c++11 -emit-llvm -g -o - %s | FileCheck %s
 // Test that we are emitting debug info and base types for scoped enums.
 
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "Color"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Color"
 // CHECK-SAME:             baseType: ![[INT:[0-9]+]]
-// CHECK: ![[INT]] = !MDBasicType(name: "int"
+// CHECK: ![[INT]] = !DIBasicType(name: "int"
 enum class Color { gray };
 
 void f(Color);
@@ -11,7 +11,7 @@ void g() {
   f(Color::gray);
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "Colour"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Colour"
 // CHECK-SAME:             baseType: ![[INT]]
 enum struct Colour { grey };
 
@@ -20,9 +20,9 @@ void i() {
   h(Colour::grey);
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "Couleur"
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Couleur"
 // CHECK-SAME:             baseType: ![[UCHAR:[0-9]+]]
-// CHECK: ![[UCHAR]] = !MDBasicType(name: "unsigned char"
+// CHECK: ![[UCHAR]] = !DIBasicType(name: "unsigned char"
 enum class Couleur : unsigned char { gris };
 
 void j(Couleur);
index 83d081b18874270f51cb70f5e00bdde897e2bdc2..8f5314e7211c74a3ad1cb135db7cc6d6c9d2d5b0 100644 (file)
@@ -4,7 +4,7 @@
 // rid of self-referenceing structure_types (PR21902), then it should be safe
 // to just kill this test.
 //
-// CHECK: ![[SELF:[0-9]+]] = distinct !MDCompositeType(tag: DW_TAG_structure_type, name: "B",
+// CHECK: ![[SELF:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "B",
 // CHECK-SAME:                                         vtableHolder: ![[SELF]]
 
 void foo() {
index 695a964a69dc2d5065b6f67b83fa0e756b2e5229..a0179d9227a708619b584a9cf134273d4548b9e0 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -x objective-c -emit-llvm -g < %s | FileCheck %s
 // Test to check that "self" argument is assigned a location.
 // CHECK: call void @llvm.dbg.declare(metadata %0** %{{[^,]+}}, metadata [[SELF:![0-9]*]], metadata !{{.*}})
-// CHECK: [[SELF]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "self"
+// CHECK: [[SELF]] = !DILocalVariable(tag: DW_TAG_arg_variable, name: "self"
 
 @interface Foo 
 -(void) Bar: (int)x ;
index 7cac8f1c7d7cd5d4a87e23605f182c0b870ad21d..1a5df30dd84c0c54816cc5a1c11da16cbfd1f924 100644 (file)
@@ -7,7 +7,7 @@
 
 @implementation Foo
 -(int) barMethod {
-  // CHECK: !MDSubprogram({{.*}}line: [[@LINE-1]]
+  // CHECK: !DISubprogram({{.*}}line: [[@LINE-1]]
   int i = 0;
   int j = 1;
   int k = 1;
index ab20f3e9baf4b1d3d5d82605545c62f7b108e1b9..329206867b852bd88b3667b9e250e7dd2fbfeb46 100644 (file)
@@ -32,8 +32,8 @@ NSRect NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h);
   // CHECK: call void @objc_storeStrong{{.*}} !dbg ![[ARC:[0-9]+]]
   // CHECK: call {{.*}} @objc_autoreleaseReturnValue{{.*}} !dbg ![[ARC]]
   // CHECK: ret {{.*}} !dbg ![[ARC]]
-  // CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   return path;
-  // CHECK: ![[ARC]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[ARC]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
 @end
index 5a9eda992eea31a3aa253582ada577e03a7d1222..a3232ecd4e05dc58dcdab15b291426369df5c5e1 100644 (file)
@@ -54,55 +54,55 @@ typedef signed char BOOL;
 
 @implementation AppDelegate : NSObject
 
-// CHECK: ![[TESTNOSIDEEFFECT:.*]] = !MDSubprogram(name: "-[AppDelegate testNoSideEffect:]"
+// CHECK: ![[TESTNOSIDEEFFECT:.*]] = !DISubprogram(name: "-[AppDelegate testNoSideEffect:]"
 // CHECK-SAME:                                     line: [[@LINE+2]]
 // CHECK-SAME:                                     isLocal: true, isDefinition: true
 - (int)testNoSideEffect:(NSString *)foo {
   int x = 1;
   return 1; // Return expression
-  // CHECK: ![[RET1]] = !MDLocation(line: [[@LINE+1]], scope: ![[TESTNOSIDEEFFECT]])
+  // CHECK: ![[RET1]] = !DILocation(line: [[@LINE+1]], scope: ![[TESTNOSIDEEFFECT]])
 }           // Cleanup + Ret
 
 - (int)testNoCleanup {
-  // CHECK: ![[RET2]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET2]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   return 1;
 }
 
 - (int)testSideEffect:(NSString *)foo {
-  // CHECK: ![[MSG3]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[MSG3]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   return [self testNoSideEffect :foo];
-  // CHECK: ![[RET3]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET3]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
 
 - (int)testMultiline:(NSString *)foo {
-  // CHECK: ![[MSG4]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[MSG4]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   int r = [self testSideEffect :foo];
-  // CHECK: ![[EXP4]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[EXP4]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   return r;
-  // CHECK: ![[RET4]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET4]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
 
 - (void)testVoid:(NSString *)foo {
   return;
-  // CHECK: ![[RET5]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET5]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
 
 - (void)testVoidNoReturn:(NSString *)foo {
-  // CHECK: ![[MSG6]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[MSG6]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   [self testVoid :foo];
-  // CHECK: ![[RET6]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET6]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
 }
 
 - (int)testNoCleanupSideEffect {
-  // CHECK: ![[MSG7]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[MSG7]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   [self testVoid :@"foo"];
-  // CHECK: ![[RET7]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
+  // CHECK: ![[RET7]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
   return 1;
 }
 
 - (void)testCleanupVoid:(BOOL)skip withDelegate: (AppDelegate *) delegate {
   static BOOL skip_all;
-  // CHECK: ![[SKIP1]] = !MDLocation(line: [[@LINE+1]], scope:
+  // CHECK: ![[SKIP1]] = !DILocation(line: [[@LINE+1]], scope:
   if (!skip_all) {
     if (!skip) {
       return;
@@ -112,8 +112,8 @@ typedef signed char BOOL;
       [delegate testVoid :s];
     }
   }
-  // CHECK: ![[RET8]] = !MDLocation(line: [[@LINE+2]], scope:
-  // CHECK: ![[ARC8]] = !MDLocation(line: [[@LINE+1]], scope:
+  // CHECK: ![[RET8]] = !DILocation(line: [[@LINE+2]], scope:
+  // CHECK: ![[ARC8]] = !DILocation(line: [[@LINE+1]], scope:
 }
 
 
index dc8379bf852b6e4063a1065a6a5d6f93d66fa50d..aa916289449e8bab31ffd2b7b72817970f563f3d 100644 (file)
@@ -3,7 +3,7 @@
 // rdar://problem/14386148
 // Test that the foo is aligned at an 8 byte boundary in the DWARF
 // expression (256) that locates it inside of the byref descriptor:
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "foo",
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "foo",
 // CHECK-NOT:            line:
 // CHECK-SAME:           align: 64
 // CHECK-SAME:           offset: 256
index 5ff184a91dea72fc9cb1fc6c72578a4c3602f463..ae49405160dfdd3d696361cbf86592ae70e227b2 100644 (file)
@@ -9,7 +9,7 @@ void f0() {
 
 // We should have 3 lexical blocks here at the moment, including one
 // for the catch block.
-// CHECK: !MDLexicalBlock(
-// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable
-// CHECK: !MDLexicalBlock(
-// CHECK: !MDLexicalBlock(
+// CHECK: !DILexicalBlock(
+// CHECK: !DILocalVariable(tag: DW_TAG_auto_variable
+// CHECK: !DILexicalBlock(
+// CHECK: !DILexicalBlock(
index ccddbef5cef14dc424451e60566c428ec3279c81..fb9d7c2045e643fb66a6da9f7734bc6aab90846b 100644 (file)
@@ -63,9 +63,9 @@ typedef enum {
 // make sure we are still in the same function
 // CHECK: define {{.*}}__copy_helper_block_
 // Metadata
-// CHECK: ![[MAIN:.*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "Main"
+// CHECK: ![[MAIN:.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Main"
 // CHECK-SAME:                            line: 23,
-// CHECK: ![[PMAIN:.*]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: ![[MAIN]],
-// CHECK: ![[BDMD]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: ".block_descriptor"
-// CHECK: ![[SELF]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "self"
+// CHECK: ![[PMAIN:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[MAIN]],
+// CHECK: ![[BDMD]] = !DILocalVariable(tag: DW_TAG_arg_variable, name: ".block_descriptor"
+// CHECK: ![[SELF]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "self"
 // CHECK-SAME:                         line: 40,
index dc57c6897792404f7ab0f54b5eab61d681c61db5..ea68cb1cf38e37f0dcc5b43b2524afb6fda3fd73 100644 (file)
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s -o - | FileCheck %s
 extern void foo(void(^)(void));
 
-// CHECK: !MDSubprogram(name: "__destroy_helper_block_"
+// CHECK: !DISubprogram(name: "__destroy_helper_block_"
 
 @interface NSObject {
   struct objc_object *isa;
index 018c4c6e2e126e3077e4bd72898d3bb52a020047..35c92dc64bda3e108bf3a6bfbb0ea08617f7d6a5 100644 (file)
@@ -1,22 +1,22 @@
 // RUN: %clang_cc1 -emit-llvm -fblocks -g  -triple x86_64-apple-darwin14 -x objective-c < %s -o - | FileCheck %s
 #define nil ((void*) 0)
 typedef signed char BOOL;
-// CHECK: ![[BOOL:[0-9]+]] = !MDDerivedType(tag: DW_TAG_typedef, name: "BOOL"
+// CHECK: ![[BOOL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "BOOL"
 // CHECK-SAME:                              line: [[@LINE-2]]
-// CHECK: ![[ID:[0-9]+]] = !MDDerivedType(tag: DW_TAG_typedef, name: "id"
+// CHECK: ![[ID:[0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "id"
 
 typedef BOOL (^SomeKindOfPredicate)(id obj);
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "__FuncPtr"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "__FuncPtr"
 // CHECK-SAME:           baseType: ![[PTR:[0-9]+]]
-// CHECK: ![[PTR]] = !MDDerivedType(tag: DW_TAG_pointer_type,
+// CHECK: ![[PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type,
 // CHECK-SAME:                      baseType: ![[FNTYPE:[0-9]+]]
-// CHECK: ![[FNTYPE]] = !MDSubroutineType(types: ![[ARGS:[0-9]+]])
+// CHECK: ![[FNTYPE]] = !DISubroutineType(types: ![[ARGS:[0-9]+]])
 // CHECK: ![[ARGS]] = !{![[BOOL]], ![[ID]]}
 
 int main()
 {
   SomeKindOfPredicate p = ^BOOL(id obj) { return obj != nil; };
-  // CHECK: !MDDerivedType(tag: DW_TAG_member, name: "__FuncPtr",
+  // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "__FuncPtr",
   // CHECK-SAME:           line: [[@LINE-2]]
   // CHECK-SAME:           size: 64, align: 64, offset: 128,
   return p(nil);
index 7e425f8b0a78403b94b946b0aa5598d7ff66f91d..5514c5164c9b9a4b49bda8f9ee1a59bd9e5bca3f 100644 (file)
 // CHECK-NOT: ret
 // CHECK: load {{.*}}, !dbg ![[DESTROY_LINE:[0-9]+]]
 
-// CHECK-DAG: [[DBG_LINE]] = !MDLocation(line: 0, scope: ![[COPY_SP:[0-9]+]])
-// CHECK-DAG: [[COPY_LINE]] = !MDLocation(line: 0, scope: ![[COPY_SP:[0-9]+]])
-// CHECK-DAG: [[COPY_SP]] = !MDSubprogram(name: "__copy_helper_block_"
-// CHECK-DAG: [[DESTROY_LINE]] = !MDLocation(line: 0, scope: ![[DESTROY_SP:[0-9]+]])
-// CHECK-DAG: [[DESTROY_SP]] = !MDSubprogram(name: "__destroy_helper_block_"
+// CHECK-DAG: [[DBG_LINE]] = !DILocation(line: 0, scope: ![[COPY_SP:[0-9]+]])
+// CHECK-DAG: [[COPY_LINE]] = !DILocation(line: 0, scope: ![[COPY_SP:[0-9]+]])
+// CHECK-DAG: [[COPY_SP]] = !DISubprogram(name: "__copy_helper_block_"
+// CHECK-DAG: [[DESTROY_LINE]] = !DILocation(line: 0, scope: ![[DESTROY_SP:[0-9]+]])
+// CHECK-DAG: [[DESTROY_SP]] = !DISubprogram(name: "__destroy_helper_block_"
 typedef unsigned int NSUInteger;
 
 @protocol NSObject
@@ -61,8 +61,8 @@ static void run(void (^block)(void))
 {
     if ((self = [super init])) {
       run(^{
-          // CHECK-DAG: ![[SELF]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "self"{{.*}}, line: [[@LINE+4]],
-          // CHECK-DAG: ![[D]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "d"{{.*}}, line: [[@LINE+1]],
+          // CHECK-DAG: ![[SELF]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "self"{{.*}}, line: [[@LINE+4]],
+          // CHECK-DAG: ![[D]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "d"{{.*}}, line: [[@LINE+1]],
           NSMutableDictionary *d = [[NSMutableDictionary alloc] init]; 
           ivar = 42 + (int)[d count];
         });
index 8291d47b09b51e4f05f19140d775587a3ec25629..8f419de9bfda71c74b01b48aad2bf34cfc9f63ba 100644 (file)
@@ -2,7 +2,7 @@
 @class ForwardObjcClass;
 ForwardObjcClass *ptr = 0;
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "ForwardObjcClass"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ForwardObjcClass"
 // CHECK-SAME:             line: 2
 // CHECK-NOT:              size:
 // CHECK-NOT:              align:
index 5fd022e07af90e31d0b67ef0ebcef8aa252070d3..1d7f545f34b6df8cd760a7ee5018bb94e8523a28 100644 (file)
@@ -1,7 +1,7 @@
 // REQUIRES: x86-registered-target
 // RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 -fexceptions -fobjc-exceptions -g %s -o - | FileCheck %s
 
-// CHECK:  !MDSubprogram(name: "-[InstanceVariablesEverywhereButTheInterface someString]"
+// CHECK:  !DISubprogram(name: "-[InstanceVariablesEverywhereButTheInterface someString]"
 
 //rdar: //8498026
 
index c3b88d77623ffa0ae26b1c9d74d7032cf55a361d..836e456b23526c465664ea400805954ea6697fc7 100644 (file)
@@ -36,12 +36,12 @@ int main()
     }
 }
 // Verify that the debug type for both variables is 'id'.
-// CHECK:  ![[IDTYPE:[0-9]+]] = !MDDerivedType(tag: DW_TAG_typedef, name: "id"
+// CHECK:  ![[IDTYPE:[0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "id"
 //
-// CHECK:  !MDLocalVariable(tag: DW_TAG_arg_variable, name: "bad_carrier"
+// CHECK:  !DILocalVariable(tag: DW_TAG_arg_variable, name: "bad_carrier"
 // CHECK-NOT:               line:
 // CHECK-SAME:              type: ![[IDTYPE]]
 //
-// CHECK:  !MDLocalVariable(tag: DW_TAG_arg_variable, name: "good_carrier"
+// CHECK:  !DILocalVariable(tag: DW_TAG_arg_variable, name: "good_carrier"
 // CHECK-NOT:               line:
 // CHECK-SAME:              type: ![[IDTYPE]]
index 4e56988d61cba5cac57ea121b121599e7d47f6c6..556bf0ee63f7cc64d5577727987b9d22a0ce018b 100644 (file)
@@ -7,7 +7,7 @@
 @interface Shape : NSObject
 
 @end
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "Circle"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Circle"
 // CHECK-SAME:             line: [[@LINE+1]],
 @interface Circle : Shape
 
index a0553671887428044c23638ef010f23a0d67ba3d..c96153edb9dc94592af49df51288dc7453f1322d 100644 (file)
 
 @implementation Foo
 +(instancetype)defaultFoo {return 0;}
-// CHECK: ![[FOO:[0-9]+]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "Foo"
-// CHECK: !MDSubprogram(name: "+[Foo defaultFoo]"
+// CHECK: ![[FOO:[0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo"
+// CHECK: !DISubprogram(name: "+[Foo defaultFoo]"
 // CHECK-SAME:          line: [[@LINE-3]]
 // CHECK-SAME:          type: ![[TYPE:[0-9]+]]
-// CHECK: ![[TYPE]] = !MDSubroutineType(types: ![[RESULT:[0-9]+]])
+// CHECK: ![[TYPE]] = !DISubroutineType(types: ![[RESULT:[0-9]+]])
 // CHECK: ![[RESULT]] = !{![[FOOPTR:[0-9]+]],
-// CHECK: ![[FOOPTR]] = !MDDerivedType(tag: DW_TAG_pointer_type
+// CHECK: ![[FOOPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type
 // CHECK-SAME:                         baseType: ![[FOO]]
 @end
 
index 187a6df219e0be23c1e85faea5eefcf7d44649f0..fe658f009f112c9fc1fd5879a2c2cfc64c5eeacb 100644 (file)
@@ -24,22 +24,22 @@ void gorf (I* pg) {
     int _b = pg->b;
 }
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "I"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
 
 // Check for "a".
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "a"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "a"
 // CHECK-SAME:           line: 7
 // CHECK-SAME:           baseType: ![[INT:[0-9]+]]
 // CHECK-SAME:           size: 32, align: 32
 // CHECK-NOT:            offset:
 // CHECK-SAME:           flags: DIFlagPublic
-// CHECK: ![[INT]] = !MDBasicType(name: "int"
+// CHECK: ![[INT]] = !DIBasicType(name: "int"
 
 // Make sure we don't output the same type twice.
-// CHECK-NOT: !MDCompositeType(tag: DW_TAG_structure_type, name: "I"
+// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
 
 // Check for "b".
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "b"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "b"
 // CHECK-SAME:           line: 18
 // CHECK-SAME:           baseType: ![[INT]]
 // CHECK-SAME:           size: 32, align: 32
index 0ef350ab2e8ed8f78571d3592e8aa6373645059f..0c644c7fe344f913f05f156656648b26f5c269e8 100644 (file)
@@ -6,10 +6,10 @@
 // This happens to be the order the members are emitted in... I'm assuming it's
 // not meaningful/important, so if something causes the order to change, feel
 // free to update the test to reflect the new order.
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "a"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "d"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "c"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "b"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "a"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "d"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "c"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "b"
 
 @interface I
 {
index 7fec4b5a646bbda1d18f94583a56c1a964c4dd66..d3d8cdc3e786bd7ed07ad2f4382216af4c5f76ff 100644 (file)
@@ -32,14 +32,14 @@ __attribute((objc_root_class)) @interface NSObject {
 }
 @end
 
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "foo"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "foo"
 // CHECK-SAME:           line: 14
 // CHECK-SAME:           baseType: ![[INT:[0-9]+]]
 // CHECK-SAME:           size: 32, align: 32,
 // CHECK-NOT:            offset:
 // CHECK-SAME:           flags: DIFlagProtected
-// CHECK: ![[INT]] = !MDBasicType(name: "int"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "bar"
+// CHECK: ![[INT]] = !DIBasicType(name: "int"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "bar"
 // CHECK-SAME:           line: 27
 // CHECK-SAME:           baseType: ![[INT:[0-9]+]]
 // CHECK-SAME:           size: 32, align: 32,
index a6d8886eec0f5aad38bdef1469fa75ec9f9c29a1..aea3edaa8ae695a3fe4c68f65209170905946d5b 100644 (file)
@@ -18,26 +18,26 @@ __attribute((objc_root_class)) @interface NSObject {
 @implementation BaseClass
 @end
 
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "i"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "i"
 // CHECK-SAME:           line: 10
 // CHECK-SAME:           baseType: ![[INT:[0-9]+]]
 // CHECK-SAME:           size: 32, align: 32,
 // CHECK-NOT:            offset:
 // CHECK-SAME:           flags: DIFlagProtected
-// CHECK: ![[INT]] = !MDBasicType(name: "int"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "flag_1"
+// CHECK: ![[INT]] = !DIBasicType(name: "int"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "flag_1"
 // CHECK-SAME:           line: 11
 // CHECK-SAME:           baseType: ![[UNSIGNED:[0-9]+]]
 // CHECK-SAME:           size: 9, align: 32,
 // CHECK-NOT:            offset:
 // CHECK-SAME:           flags: DIFlagProtected
-// CHECK: ![[UNSIGNED]] = !MDBasicType(name: "unsigned int"
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "flag_2"
+// CHECK: ![[UNSIGNED]] = !DIBasicType(name: "unsigned int"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "flag_2"
 // CHECK-SAME:           line: 12
 // CHECK-SAME:           baseType: ![[UNSIGNED]]
 // CHECK-SAME:           size: 9, align: 32, offset: 1,
 // CHECK-SAME:           flags: DIFlagProtected
-// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "flag_3"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "flag_3"
 // CHECK-SAME:           line: 14
 // CHECK-SAME:           baseType: ![[UNSIGNED]]
 // CHECK-SAME:           size: 9, align: 32, offset: 3,
index 67285ce0d6ee2f7b004724dac37a6838b86cf66a..bbd7dd4ac3b19ea1dfa4aff2d39d37681428bd84 100644 (file)
 {
   // The debug type for these two will be identical, because we do not
   // actually emit the ownership qualifier.
-  // CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "weakSelf",
+  // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "weakSelf",
   // CHECK-SAME:             line: [[@LINE+2]]
   // CHECK-SAME:             type: ![[SELFTY:[0-9]+]]
   __attribute__((objc_ownership(weak))) __typeof(self) weakSelf = self;
   Block = [^{
-  // CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "strongSelf",
+  // CHECK: !DILocalVariable(tag: DW_TAG_auto_variable, name: "strongSelf",
   // CHECK-SAME:             line: [[@LINE+2]]
   // CHECK-SAME:             type: ![[SELFTY]]
       __attribute__((objc_ownership(strong))) __typeof(self) strongSelf = weakSelf;
index 01fbe58bdd31bbd3fc139e31e876190108b52020..274bf6e74db6e19b115e189944df1e65a6bfd90f 100644 (file)
@@ -5,7 +5,7 @@
 // Ensure we emit the names of explicit/renamed accessors even if they
 // are defined later in the implementation section.
 //
-// CHECK:  !MDObjCProperty(name: "blah"
+// CHECK:  !DIObjCProperty(name: "blah"
 // CHECK-SAME:             getter: "isBlah"
 
 @class NSString;
index 1b9599865eca83317782c472e0e84be93dba1444..68cb234878a388627f95ee3bfab7f40ab9c60ba9 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -S -emit-llvm -g %s -o - | FileCheck %s
 
 @interface I1
-// CHECK: !MDObjCProperty(name: "p1"
+// CHECK: !DIObjCProperty(name: "p1"
 // CHECK-SAME:            line: [[@LINE+2]]
 // CHECK-SAME:            attributes: 2316
 @property int p1;
index dd30f6cb9068fcfc94cdf6e8d4ede9e951df179c..e95ddab9049ef889597e87a88aaadb90138a68e6 100644 (file)
@@ -1,7 +1,7 @@
 // REQUIRES: x86-registered-target
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -emit-llvm %s -o - | FileCheck %s
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "H"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "H"
 // CHECK-SAME:             line: [[@LINE+1]],
 @interface H
 -(void) foo;
index 58a753c32a139a4f0f91e300bdcb8c842059f1a3..225a0bdef63fee11be1a1189c909bd42c45cc4ec 100644 (file)
 }
 @end
 
-// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "self", arg: 1,
+// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable, name: "self", arg: 1,
 // CHECK-SAME:             scope: ![[CTOR:[0-9]+]]
 // CHECK-NOT:              line:
 // CHECK-SAME:             flags: DIFlagArtificial | DIFlagObjectPointer{{[,)]}}
-// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "_cmd", arg: 2,
+// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable, name: "_cmd", arg: 2,
 // CHECK-SAME:             scope: ![[CTOR]]
 // CHECK-NOT:              line:
 // CHECK-SAME:             flags: DIFlagArtificial{{[,)]}}
-// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "myarg", arg: 3,
+// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable, name: "myarg", arg: 3,
 // CHECK-SAME:             scope: ![[CTOR]]
 // CHECK-SAME:             line: 11
 // CHECK-NOT:              flags:
index ac615d89215ae24eab138bec3115bc063dfd6472..50334250dfaee218cb5762a3a9a26e37d5d528e3 100644 (file)
@@ -2,7 +2,7 @@
 // Radar 8801045
 // Do not emit AT_MIPS_linkage_name for static variable i
 
-// CHECK: !MDGlobalVariable(name: "i"
+// CHECK: !DIGlobalVariable(name: "i"
 // CHECK-NOT:               linkageName:
 // CHECK-SAME:              ){{$}}
 
index ad9bea762a10999be6e02c34d7c46086c28724fb..2bf001b28cba3d1f4e1c4694074baba0718ebdcf 100644 (file)
@@ -30,8 +30,8 @@ int main(int argc, char *argv[]) {
   }
 }
 
-// CHECK: ![[FILE:.*]] = !MDFile(filename: "{{[^"]+}}foo.h"
-// CHECK: !MDSubprogram(name: "-[Foo setDict:]"
+// CHECK: ![[FILE:.*]] = !DIFile(filename: "{{[^"]+}}foo.h"
+// CHECK: !DISubprogram(name: "-[Foo setDict:]"
 // CHECK-SAME:          file: ![[FILE]],
 // CHECK-SAME:          line: 8,
 // CHECK-SAME:          isLocal: true, isDefinition: true
index 7f9ad276c8188f03a3dc2bf2ddca374d4ab81a29..828d4dc4a16427a026bfda937564116a909b4f78 100644 (file)
@@ -10,7 +10,7 @@
 @implementation Foo
 - (void) Bar: (int) n, ...
 {
-  // CHECK: !MDSubroutineType(types: ![[NUM:[0-9]+]])
+  // CHECK: !DISubroutineType(types: ![[NUM:[0-9]+]])
   // CHECK: ![[NUM]] = {{!{null, ![^,]*, ![^,]*, ![^,]*, null}}}
 }
 @end
index 37ff11f51aee0db9e0197807d63ab2efcb0bbe55..8367478b943bc676a1de5c26570819d2e96eb20c 100644 (file)
 // CHECK-NOT: ret
 // CHECK: load {{.*}}, !dbg ![[DBG2:[0-9]+]]
 //
-// CHECK: !MDSubprogram(name: "-[I p1]",{{.*}} line: [[@LINE+4]],{{.*}} isLocal: true, isDefinition: true
-// CHECK: !MDSubprogram(name: "-[I setP1:]",{{.*}} line: [[@LINE+3]],{{.*}} isLocal: true, isDefinition: true
-// CHECK: ![[DBG1]] = !MDLocation(line: [[@LINE+2]],
-// CHECK: ![[DBG2]] = !MDLocation(line: [[@LINE+1]],
+// CHECK: !DISubprogram(name: "-[I p1]",{{.*}} line: [[@LINE+4]],{{.*}} isLocal: true, isDefinition: true
+// CHECK: !DISubprogram(name: "-[I setP1:]",{{.*}} line: [[@LINE+3]],{{.*}} isLocal: true, isDefinition: true
+// CHECK: ![[DBG1]] = !DILocation(line: [[@LINE+2]],
+// CHECK: ![[DBG2]] = !DILocation(line: [[@LINE+1]],
 @property int p1;
 @end
 
index 707d234b741368213cc9e6818dfdc240223d8ed7..b2c479c03100cca545b5eff775f9a75173b1ca29 100644 (file)
 
 @protocol HasASelection <NSObject>
 @property (nonatomic, retain) Selection* selection;
-// CHECK: !MDSubprogram(name: "-[MyClass selection]"
+// CHECK: !DISubprogram(name: "-[MyClass selection]"
 // CHECK-SAME:          line: [[@LINE-2]]
 // CHECK-SAME:          isLocal: true, isDefinition: true
-// CHECK: !MDSubprogram(name: "-[MyClass setSelection:]"
+// CHECK: !DISubprogram(name: "-[MyClass setSelection:]"
 // CHECK-SAME:          line: [[@LINE-5]]
 // CHECK-SAME:          isLocal: true, isDefinition: true
-// CHECK: !MDSubprogram(name: "-[OtherClass selection]"
+// CHECK: !DISubprogram(name: "-[OtherClass selection]"
 // CHECK-SAME:          line: [[@LINE-8]]
 // CHECK-SAME:          isLocal: true, isDefinition: true
-// CHECK: !MDSubprogram(name: "-[OtherClass setSelection:]"
+// CHECK: !DISubprogram(name: "-[OtherClass setSelection:]"
 // CHECK-SAME:          line: [[@LINE-11]]
 // CHECK-SAME:          isLocal: true, isDefinition: true
 
index dbac91df8401ddcf6d007a3ac81e484233344e7d..52811b1d68bca8a1f55ed65c12d2bd242421efc7 100644 (file)
@@ -46,35 +46,35 @@ int main() {
   // -treated as C++11 strongly typed enums.
   return e0 != e1 && e1 == e2 && e2 == e3;
 }
-// CHECK: ![[ENUMERATOR0:[0-9]+]] = !MDCompositeType(tag: DW_TAG_enumeration_type
+// CHECK: ![[ENUMERATOR0:[0-9]+]] = !DICompositeType(tag: DW_TAG_enumeration_type
 // CHECK-SAME:                                       line: 10,
-// CHECK: ![[ENUMERATOR1:[0-9]+]] = !MDCompositeType(tag: DW_TAG_enumeration_type, name: "Enum1"
+// CHECK: ![[ENUMERATOR1:[0-9]+]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "Enum1"
 // CHECK-SAME:                                       line: 16
 // CHECK-SAME:                                       baseType: ![[ENUMERATOR3:[0-9]+]]
-// CHECK: ![[ENUMERATOR3]] = !MDDerivedType(tag: DW_TAG_typedef, name: "NSInteger"
+// CHECK: ![[ENUMERATOR3]] = !DIDerivedType(tag: DW_TAG_typedef, name: "NSInteger"
 // CHECK-SAME:                              line: 6
 // CHECK-SAME:                              baseType: ![[LONGINT:[0-9]+]]
-// CHECK: ![[LONGINT]] = !MDBasicType(name: "long int"
-// CHECK: ![[ENUMERATOR2:[0-9]+]] = !MDCompositeType(tag: DW_TAG_enumeration_type,
+// CHECK: ![[LONGINT]] = !DIBasicType(name: "long int"
+// CHECK: ![[ENUMERATOR2:[0-9]+]] = !DICompositeType(tag: DW_TAG_enumeration_type,
 // CHECK-SAME:                                       line: 22
 // CHECK-SAME:                                       baseType: ![[ENUMERATOR3]]
 
-// CHECK: ![[ENUM0]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "e0"
+// CHECK: ![[ENUM0]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "e0"
 // CHECK-SAME:                          type: ![[TYPE0:[0-9]+]]
-// CHECK: ![[TYPE0]] = !MDDerivedType(tag: DW_TAG_typedef, name: "Enum0",
+// CHECK: ![[TYPE0]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Enum0",
 // CHECK-SAME:                        baseType: ![[ENUMERATOR0]]
 
-// CHECK: ![[ENUM1]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "e1"
+// CHECK: ![[ENUM1]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "e1"
 // CHECK-SAME:                          type: ![[TYPE1:[0-9]+]]
-// CHECK: ![[TYPE1]] = !MDDerivedType(tag: DW_TAG_typedef, name: "Enum1"
+// CHECK: ![[TYPE1]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Enum1"
 // CHECK-SAME:                        baseType: ![[ENUMERATOR1]]
 
-// CHECK: ![[ENUM2]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "e2"
+// CHECK: ![[ENUM2]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "e2"
 // CHECK-SAME:                          type: ![[TYPE2:[0-9]+]]
-// CHECK: ![[TYPE2]] = !MDDerivedType(tag: DW_TAG_typedef, name: "Enum2"
+// CHECK: ![[TYPE2]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Enum2"
 // CHECK-SAME:                        baseType: ![[ENUMERATOR2]]
 
-// CHECK: ![[ENUM3]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "e3"
+// CHECK: ![[ENUM3]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "e3"
 // CHECK-SAME:                          type: ![[TYPE3:[0-9]+]]
-// CHECK: ![[TYPE3]] = !MDDerivedType(tag: DW_TAG_typedef, name: "Enum3"
+// CHECK: ![[TYPE3]] = !DIDerivedType(tag: DW_TAG_typedef, name: "Enum3"
 // CHECK-SAME:                        baseType: ![[ENUMERATOR3]]
index fdae22b5117a72e7bd2e9a3f359a6c3e1dd831e8..8983fe511204c7eee6416f1cba20ee9af38b2638 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin -g -emit-llvm %s -o - | FileCheck %s
 
 struct B {
-// CHECK: ![[B:[0-9]+]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "B"
+// CHECK: ![[B:[0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "B"
 // CHECK-SAME:                             line: [[@LINE-2]],
 // CHECK-SAME:                             size: 8, align: 8,
 // CHECK-NOT:                              offset:
@@ -9,12 +9,12 @@ struct B {
 // CHECK-SAME:                             elements: ![[BMEMBERS:[0-9]+]]
 // CHECK: ![[BMEMBERS]] = !{![[BB:[0-9]+]]}
   B(struct A *);
-// CHECK: ![[BB]] = !MDSubprogram(name: "B", scope: ![[B]]
+// CHECK: ![[BB]] = !DISubprogram(name: "B", scope: ![[B]]
 // CHECK-SAME:                    line: [[@LINE-2]],
 // CHECK-SAME:                    type: ![[TY:[0-9]+]],
-// CHECK: ![[TY]] = !MDSubroutineType(types: ![[ARGS:[0-9]+]])
+// CHECK: ![[TY]] = !DISubroutineType(types: ![[ARGS:[0-9]+]])
 // CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]], !{{[^,]+}}}
-// CHECK: ![[THIS]] = !MDDerivedType(tag: DW_TAG_pointer_type,
+// CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_pointer_type,
 // CHECK-SAME:                       baseType: ![[B]]
 };
 
index 4c934f12070823e41c015c4a5a8b956e4727014d..a7d6a15599875e55a1daa2bd6b7af3d256f739e4 100644 (file)
@@ -26,5 +26,5 @@ void f1() {
 }
 @end
 
-// CHECK: [[DBG_F1]] = !MDLocation(line: 100,
-// CHECK: [[DBG_TNSO]] = !MDLocation(line: 200,
+// CHECK: [[DBG_F1]] = !DILocation(line: 100,
+// CHECK: [[DBG_TNSO]] = !DILocation(line: 200,
index 0f3ce79605e4f87445396b8262aca32ed13e8bf8..17b0bba17c6bad30ca7d484d638db79f2bc7fe70 100644 (file)
@@ -5,7 +5,7 @@
 // <rdar://problem/12955296>
 // RUN: %clang -### -target i386-apple-darwin9 -c -g %t.s 2>&1 | FileCheck -check-prefix=P %s
 
-// CHECK: !0 = !MDCompileUnit(
+// CHECK: !0 = !DICompileUnit(
 // CHECK-SAME:                flags:
 // CHECK-SAME:                -I path\5C with\5C \5C\5Cspaces
 // CHECK-SAME:                -g -Os
index 813b66c65a4273ee7dafc066edcd92d73aa9910a..ba8c945de3377e1a5cab7e6d7a6a2fdab6c8434a 100644 (file)
@@ -104,7 +104,7 @@ void parallel_atomic() {
   // TERM_DEBUG:     call void @__clang_call_terminate
   // TERM_DEBUG:     unreachable
 }
-// TERM_DEBUG-DAG: [[READ_LOC]] = !MDLocation(line: [[@LINE-33]],
-// TERM_DEBUG-DAG: [[WRITE_LOC]] = !MDLocation(line: [[@LINE-28]],
-// TERM_DEBUG-DAG: [[UPDATE_LOC]] = !MDLocation(line: [[@LINE-22]],
-// TERM_DEBUG-DAG: [[CAPTURE_LOC]] = !MDLocation(line: [[@LINE-16]],
+// TERM_DEBUG-DAG: [[READ_LOC]] = !DILocation(line: [[@LINE-33]],
+// TERM_DEBUG-DAG: [[WRITE_LOC]] = !DILocation(line: [[@LINE-28]],
+// TERM_DEBUG-DAG: [[UPDATE_LOC]] = !DILocation(line: [[@LINE-22]],
+// TERM_DEBUG-DAG: [[CAPTURE_LOC]] = !DILocation(line: [[@LINE-16]],
index cf99a7520254da8d5585004c940e009c2ea953f0..6e68b2c4f4a02f786dce20a92b585c19cb27a3e4 100644 (file)
@@ -53,6 +53,6 @@ void parallel_critical() {
   // TERM_DEBUG:     unreachable
   foo();
 }
-// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !MDLocation(line: [[@LINE-12]],
-// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !MDLocation(line: [[@LINE-3]],
+// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !DILocation(line: [[@LINE-12]],
+// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !DILocation(line: [[@LINE-3]],
 #endif
index 85f1ba69b27b4ab319124b92056c98de8b69db7d..41cc4c0143c0c468b1c9f29f51105c10adf7cf36 100644 (file)
@@ -361,9 +361,9 @@ void parallel_for(float *a) {
     a[i] += foo();
 }
 // Check source line corresponds to "#pragma omp for schedule(static, 5)" above:
-// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !MDLocation(line: [[@LINE-15]],
-// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !MDLocation(line: [[@LINE-16]],
-// TERM_DEBUG-DAG: [[DBG_LOC_CANCEL]] = !MDLocation(line: [[@LINE-17]],
+// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !DILocation(line: [[@LINE-15]],
+// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !DILocation(line: [[@LINE-16]],
+// TERM_DEBUG-DAG: [[DBG_LOC_CANCEL]] = !DILocation(line: [[@LINE-17]],
 
 #endif // HEADER
 
index 8dfd53c5624b5e96199de65fccf5dfc63f8af2f7..732a9054482cc9b02e4d3a10b70bad03f57f916e 100644 (file)
@@ -61,7 +61,7 @@ void parallel_master() {
   // TERM_DEBUG:     unreachable
   foo();
 }
-// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !MDLocation(line: [[@LINE-12]],
-// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !MDLocation(line: [[@LINE-3]],
+// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !DILocation(line: [[@LINE-12]],
+// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !DILocation(line: [[@LINE-3]],
 
 #endif
index 3942fad9328f391621b9b9358d10324f07c99842..058bcfc38412161cc3e0e7d737e6f5e93deb5a0e 100644 (file)
@@ -368,9 +368,9 @@ void parallel_for(float *a) {
     a[i] += foo();
 }
 // Check source line corresponds to "#pragma omp parallel for schedule(static, 5)" above:
-// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !MDLocation(line: [[@LINE-4]],
-// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !MDLocation(line: [[@LINE-16]],
-// TERM_DEBUG-DAG: [[DBG_LOC_CANCEL]] = !MDLocation(line: [[@LINE-17]],
+// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !DILocation(line: [[@LINE-4]],
+// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !DILocation(line: [[@LINE-16]],
+// TERM_DEBUG-DAG: [[DBG_LOC_CANCEL]] = !DILocation(line: [[@LINE-17]],
 
 #endif // HEADER
 
index c6381682580eb1a2a90df977f9359c5c6216a088..022dabc03ec567685dfe497df813d0e9744c3b7c 100644 (file)
@@ -473,6 +473,6 @@ void parallel_simd(float *a) {
   for (unsigned i = 131071; i <= 2147483647; i += 127)
     a[i] += bar();
 }
-// TERM_DEBUG: !{{[0-9]+}} = !MDLocation(line: [[@LINE-11]],
+// TERM_DEBUG: !{{[0-9]+}} = !DILocation(line: [[@LINE-11]],
 #endif // HEADER
 
index 19574bf1f34e725c4959838987334ec308d14581..eca7e0e4beeb3d65f416963cff173f4b9d34415a 100644 (file)
@@ -164,7 +164,7 @@ void parallel_single() {
   // TERM_DEBUG:     unreachable
   foo();
 }
-// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !MDLocation(line: [[@LINE-12]],
-// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !MDLocation(line: [[@LINE-3]],
+// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !DILocation(line: [[@LINE-12]],
+// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !DILocation(line: [[@LINE-3]],
 
 #endif
index 65f1d12b53df621f8ecac66f05b57993ec2d4454..067f98165a27deec31c775dc3543d7f880757658 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -emit-pch -o %t %S/debug-info-limited-struct.h
 // RUN: %clang_cc1 -include-pch %t -emit-llvm %s -g -o - | FileCheck %s
 
-// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo"
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
 // CHECK-NOT:              flags: {{[^,]*}}FlagFwdDecl
 // CHECK-SAME:             {{$}}
index a800f1c798d47548e8a2e31791415094bc6fac85..28521b466c37816356358673a0dd3896d1876504 100644 (file)
@@ -28,8 +28,8 @@
 // Debug info
 
 // RUN: %clang_cc1 -I %t -ivfsoverlay %t.external.yaml -triple %itanium_abi_triple -g -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-DEBUG-EXTERNAL %s
-// CHECK-DEBUG-EXTERNAL: !MDSubprogram({{.*}}file: ![[Num:[0-9]+]]
-// CHECK-DEBUG-EXTERNAL: ![[Num]] = !MDFile(filename: "{{[^"]*}}Inputs{{.}}external-names.h"
+// CHECK-DEBUG-EXTERNAL: !DISubprogram({{.*}}file: ![[Num:[0-9]+]]
+// CHECK-DEBUG-EXTERNAL: ![[Num]] = !DIFile(filename: "{{[^"]*}}Inputs{{.}}external-names.h"
 
 // RUN: %clang_cc1 -I %t -ivfsoverlay %t.yaml -triple %itanium_abi_triple -g -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-DEBUG %s
 // CHECK-DEBUG-NOT: Inputs