[llvm] r267296 - DebugInfo: Remove MDString-based type references

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 23 14:08:04 PDT 2016


Author: dexonsmith
Date: Sat Apr 23 16:08:00 2016
New Revision: 267296

URL: http://llvm.org/viewvc/llvm-project?rev=267296&view=rev
Log:
DebugInfo: Remove MDString-based type references

Eliminate DITypeIdentifierMap and make DITypeRef a thin wrapper around
DIType*.  It is no longer legal to refer to a DICompositeType by its
'identifier:', and DIBuilder no longer retains all types with an
'identifier:' automatically.

Aside from the bitcode upgrade, this is mainly removing logic to resolve
an MDString-based reference to an actualy DIType.  The commits leading
up to this have made the implicit type map in DICompileUnit's
'retainedTypes:' field superfluous.

This does not remove DITypeRef, DIScopeRef, DINodeRef, and
DITypeRefArray, or stop using them in DI-related metadata.  Although as
of this commit they aren't serving a useful purpose, there are patchces
under review to reuse them for CodeView support.

The tests in LLVM were updated with deref-typerefs.sh, which is attached
to the thread "[RFC] Lazy-loading of debug info metadata":

  http://lists.llvm.org/pipermail/llvm-dev/2016-April/098318.html

Added:
    llvm/trunk/test/Bitcode/dityperefs-3.8.ll
    llvm/trunk/test/Bitcode/dityperefs-3.8.ll.bc
Modified:
    llvm/trunk/docs/LangRef.rst
    llvm/trunk/include/llvm/IR/DebugInfo.h
    llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
    llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
    llvm/trunk/lib/IR/DIBuilder.cpp
    llvm/trunk/lib/IR/DebugInfo.cpp
    llvm/trunk/lib/IR/DebugInfoMetadata.cpp
    llvm/trunk/lib/IR/LLVMContextImpl.h
    llvm/trunk/lib/IR/Verifier.cpp
    llvm/trunk/test/Assembler/dicompositetype-members.ll
    llvm/trunk/test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll
    llvm/trunk/test/CodeGen/X86/misched-code-difference-with-debug.ll
    llvm/trunk/test/DebugInfo/AArch64/cfi-eof-prologue.ll
    llvm/trunk/test/DebugInfo/AArch64/frameindices.ll
    llvm/trunk/test/DebugInfo/ARM/cfi-eof-prologue.ll
    llvm/trunk/test/DebugInfo/Generic/PR20038.ll
    llvm/trunk/test/DebugInfo/Generic/dead-argument-order.ll
    llvm/trunk/test/DebugInfo/Generic/debug-info-qualifiers.ll
    llvm/trunk/test/DebugInfo/Generic/def-line.ll
    llvm/trunk/test/DebugInfo/Generic/enum-types.ll
    llvm/trunk/test/DebugInfo/Generic/incorrect-variable-debugloc.ll
    llvm/trunk/test/DebugInfo/Generic/member-order.ll
    llvm/trunk/test/DebugInfo/Generic/namespace.ll
    llvm/trunk/test/DebugInfo/Generic/recursive_inlining.ll
    llvm/trunk/test/DebugInfo/Generic/tu-composite.ll
    llvm/trunk/test/DebugInfo/Generic/tu-member-pointer.ll
    llvm/trunk/test/DebugInfo/Generic/varargs.ll
    llvm/trunk/test/DebugInfo/Generic/virtual-index.ll
    llvm/trunk/test/DebugInfo/X86/DW_AT_linkage_name.ll
    llvm/trunk/test/DebugInfo/X86/constant-aggregate.ll
    llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll
    llvm/trunk/test/DebugInfo/X86/data_member_location.ll
    llvm/trunk/test/DebugInfo/X86/debug-info-access.ll
    llvm/trunk/test/DebugInfo/X86/debug-loc-offset.ll
    llvm/trunk/test/DebugInfo/X86/decl-derived-member.ll
    llvm/trunk/test/DebugInfo/X86/deleted-bit-piece.ll
    llvm/trunk/test/DebugInfo/X86/externaltyperef.ll
    llvm/trunk/test/DebugInfo/X86/fission-inline.ll
    llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll
    llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll
    llvm/trunk/test/DebugInfo/X86/inline-member-function.ll
    llvm/trunk/test/DebugInfo/X86/memberfnptr.ll
    llvm/trunk/test/DebugInfo/X86/nodebug_with_debug_loc.ll
    llvm/trunk/test/DebugInfo/X86/nophysreg.ll
    llvm/trunk/test/DebugInfo/X86/pr19307.ll
    llvm/trunk/test/DebugInfo/X86/safestack-byval.ll
    llvm/trunk/test/DebugInfo/X86/sret.ll
    llvm/trunk/test/DebugInfo/X86/sroasplit-4.ll
    llvm/trunk/test/DebugInfo/X86/template.ll
    llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll
    llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
    llvm/trunk/test/Linker/Inputs/type-unique-inheritance-a.ll
    llvm/trunk/test/Linker/Inputs/type-unique-inheritance-b.ll
    llvm/trunk/test/Linker/Inputs/type-unique-simple2-a.ll
    llvm/trunk/test/Linker/Inputs/type-unique-simple2-b.ll
    llvm/trunk/test/Linker/type-unique-odr-a.ll
    llvm/trunk/test/Linker/type-unique-odr-b.ll
    llvm/trunk/test/Linker/type-unique-simple-a.ll
    llvm/trunk/test/Linker/type-unique-simple-b.ll
    llvm/trunk/test/Linker/type-unique-simple2-a.ll
    llvm/trunk/test/Linker/type-unique-simple2-b.ll
    llvm/trunk/test/Linker/type-unique-type-array-a.ll
    llvm/trunk/test/Linker/type-unique-type-array-b.ll
    llvm/trunk/test/Transforms/GCOVProfiling/linezero.ll
    llvm/trunk/test/Transforms/Inline/alloca-dbgdeclare.ll
    llvm/trunk/test/Transforms/SafeStack/debug-loc.ll
    llvm/trunk/test/Transforms/Util/split-bit-piece.ll
    llvm/trunk/test/Verifier/dbg-typerefs.ll
    llvm/trunk/tools/opt/BreakpointPrinter.cpp
    llvm/trunk/unittests/IR/MetadataTest.cpp

Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Sat Apr 23 16:08:00 2016
@@ -4019,12 +4019,13 @@ The following ``tag:`` values are valid:
   DW_TAG_volatile_type      = 53
   DW_TAG_restrict_type      = 55
 
+.. _DIDerivedTypeMember:
+
 ``DW_TAG_member`` is used to define a member of a :ref:`composite type
 <DICompositeType>`. The type of the member is the ``baseType:``. The
-``offset:`` is the member's bit offset.  If the composite type has a non-empty
-``identifier:``, then it respects ODR rules.  In that case, the ``scope:``
-reference will be a :ref:`metadata string <metadata-string>`, and the member
-will be uniqued solely based on its ``name:`` and ``scope:``.
+``offset:`` is the member's bit offset.  If the composite type has an ODR
+``identifier:`` and does not set ``flags: DIFwdDecl``, then the member is
+uniqued based only on its ``name:`` and ``scope:``.
 
 ``DW_TAG_inheritance`` and ``DW_TAG_friend`` are used in the ``elements:``
 field of :ref:`composite types <DICompositeType>` to describe parents and
@@ -4047,9 +4048,10 @@ DICompositeType
 structures and unions. ``elements:`` points to a tuple of the composed types.
 
 If the source language supports ODR, the ``identifier:`` field gives the unique
-identifier used for type merging between modules. When specified, other types
-can refer to composite types indirectly via a :ref:`metadata string
-<metadata-string>` that matches their identifier.
+identifier used for type merging between modules.  When specified,
+:ref:`subprogram declarations <DISubprogramDeclaration>` and :ref:`member
+derived types <DIDerivedTypeMember>` that reference the ODR-type in their
+``scope:`` change uniquing rules.
 
 For a given ``identifier:``, there should only be a single composite type that
 does not have  ``flags: DIFlagFwdDecl`` set.  LLVM tools that link modules
@@ -4178,11 +4180,13 @@ metadata. The ``variables:`` field point
 that must be retained, even if their IR counterparts are optimized out of
 the IR. The ``type:`` field must point at an :ref:`DISubroutineType`.
 
+.. _DISubprogramDeclaration:
+
 When ``isDefinition: false``, subprograms describe a declaration in the type
-tree as opposed to a definition of a funciton.  If the scope is a
-:ref:`metadata string <metadata-string>` then the composite type follows ODR
-rules, and the subprogram declaration is uniqued based only on its
-``linkageName:`` and ``scope:``.
+tree as opposed to a definition of a function.  If the scope is a composite
+type with an ODR ``identifier:`` and that does not set ``flags: DIFwdDecl``,
+then the subprogram declaration is uniqued based only on its ``linkageName:``
+and ``scope:``.
 
 .. code-block:: llvm
 

Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Sat Apr 23 16:08:00 2016
@@ -33,15 +33,9 @@ class DbgValueInst;
 template <typename K, typename V, typename KeyInfoT, typename BucketT>
 class DenseMap;
 
-/// \brief Maps from type identifier to the actual MDNode.
-typedef DenseMap<const MDString *, DIType *> DITypeIdentifierMap;
-
 /// \brief Find subprogram that is enclosing this scope.
 DISubprogram *getDISubprogram(const MDNode *Scope);
 
-/// \brief Generate map by visiting all retained types.
-DITypeIdentifierMap generateDITypeIdentifierMap(const Module &M);
-
 /// \brief Strip debug info in the module if it exists.
 ///
 /// To do this, we remove all calls to the debugger intrinsics and any named
@@ -63,8 +57,6 @@ unsigned getDebugMetadataVersionFromModu
 /// used by the CUs.
 class DebugInfoFinder {
 public:
-  DebugInfoFinder() : TypeMapInitialized(false) {}
-
   /// \brief Process entire module and collect debug info anchors.
   void processModule(const Module &M);
 
@@ -132,10 +124,6 @@ private:
   SmallVector<DIType *, 8> TYs;
   SmallVector<DIScope *, 8> Scopes;
   SmallPtrSet<const MDNode *, 32> NodesSeen;
-  DITypeIdentifierMap TypeIdentifierMap;
-
-  /// \brief Specify if TypeIdentifierMap is initialized.
-  bool TypeMapInitialized;
 };
 
 } // end namespace llvm

Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Sat Apr 23 16:08:00 2016
@@ -45,21 +45,23 @@ namespace llvm {
 
 template <typename T> class Optional;
 
-/// \brief Pointer union between a subclass of DINode and MDString.
+/// Holds a subclass of DINode.
 ///
-/// \a DICompositeType can be referenced via an \a MDString unique identifier.
-/// This class allows some type safety in the face of that, requiring either a
-/// node of a particular type or an \a MDString.
+/// FIXME: This class doesn't currently make much sense.  Previously it was a
+/// union beteen MDString (for ODR-uniqued types) and things like DIType.  To
+/// support CodeView work, it wasn't deleted outright when MDString-based type
+/// references were deleted; we'll soon need a similar concept for CodeView
+/// DITypeIndex.
 template <class T> class TypedDINodeRef {
   const Metadata *MD = nullptr;
 
 public:
   TypedDINodeRef() = default;
   TypedDINodeRef(std::nullptr_t) {}
+  TypedDINodeRef(const T *MD) : MD(MD) {}
 
-  /// \brief Construct from a raw pointer.
   explicit TypedDINodeRef(const Metadata *MD) : MD(MD) {
-    assert((!MD || isa<MDString>(MD) || isa<T>(MD)) && "Expected valid ref");
+    assert((!MD || isa<T>(MD)) && "Expected valid type ref");
   }
 
   template <class U>
@@ -71,26 +73,10 @@ public:
 
   operator Metadata *() const { return const_cast<Metadata *>(MD); }
 
+  T *resolve() const { return const_cast<T *>(cast_or_null<T>(MD)); }
+
   bool operator==(const TypedDINodeRef<T> &X) const { return MD == X.MD; }
   bool operator!=(const TypedDINodeRef<T> &X) const { return MD != X.MD; }
-
-  /// \brief Create a reference.
-  ///
-  /// Get a reference to \c N, using an \a MDString reference if available.
-  static TypedDINodeRef get(const T *N);
-
-  template <class MapTy> T *resolve(const MapTy &Map) const {
-    if (!MD)
-      return nullptr;
-
-    if (auto *Typed = dyn_cast<T>(MD))
-      return const_cast<T *>(Typed);
-
-    auto *S = cast<MDString>(MD);
-    auto I = Map.find(S);
-    assert(I != Map.end() && "Missing identifier in type map");
-    return cast<T>(I->second);
-  }
 };
 
 typedef TypedDINodeRef<DINode> DINodeRef;
@@ -201,8 +187,6 @@ public:
   static unsigned splitFlags(unsigned Flags,
                              SmallVectorImpl<unsigned> &SplitFlags);
 
-  DINodeRef getRef() const { return DINodeRef::get(this); }
-
   static bool classof(const Metadata *MD) {
     switch (MD->getMetadataID()) {
     default:
@@ -437,8 +421,6 @@ public:
                              : static_cast<Metadata *>(getOperand(0));
   }
 
-  DIScopeRef getRef() const { return DIScopeRef::get(this); }
-
   static bool classof(const Metadata *MD) {
     switch (MD->getMetadataID()) {
     default:
@@ -602,8 +584,6 @@ public:
   bool isRValueReference() const { return getFlags() & FlagRValueReference; }
   bool isExternalTypeRef() const { return getFlags() & FlagExternalTypeRef; }
 
-  DITypeRef getRef() const { return DITypeRef::get(this); }
-
   static bool classof(const Metadata *MD) {
     switch (MD->getMetadataID()) {
     default:
@@ -933,14 +913,6 @@ public:
   }
 };
 
-template <class T> TypedDINodeRef<T> TypedDINodeRef<T>::get(const T *N) {
-  if (N)
-    if (auto *Composite = dyn_cast<DICompositeType>(N))
-      if (auto *S = Composite->getRawIdentifier())
-        return TypedDINodeRef<T>(S);
-  return TypedDINodeRef<T>(N);
-}
-
 /// \brief Type array for a subprogram.
 ///
 /// TODO: Fold the array of types in directly as operands.

Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Sat Apr 23 16:08:00 2016
@@ -114,6 +114,14 @@ class BitcodeReaderMetadataList {
   /// move) on resize, and TrackingMDRef is very expensive to copy.
   SmallVector<TrackingMDRef, 1> MetadataPtrs;
 
+  /// Structures for resolving old type refs.
+  struct {
+    SmallDenseMap<MDString *, TempMDTuple, 1> Unknown;
+    SmallDenseMap<MDString *, DICompositeType *, 1> Final;
+    SmallDenseMap<MDString *, DICompositeType *, 1> FwdDecls;
+    std::vector<std::pair<TrackingMDRef, TempMDTuple>> Arrays;
+  } OldTypeRefs;
+
   LLVMContext &Context;
 public:
   BitcodeReaderMetadataList(LLVMContext &C)
@@ -159,6 +167,18 @@ public:
   void assignValue(Metadata *MD, unsigned Idx);
   void tryToResolveCycles();
   bool hasFwdRefs() const { return AnyFwdRefs; }
+
+  /// Upgrade a type that had an MDString reference.
+  void addTypeRef(MDString &UUID, DICompositeType &CT);
+
+  /// Upgrade a type that had an MDString reference.
+  Metadata *upgradeTypeRef(Metadata *MaybeUUID);
+
+  /// Upgrade a type ref array that may have MDString references.
+  Metadata *upgradeTypeRefArray(Metadata *MaybeTuple);
+
+private:
+  Metadata *resolveTypeRefArray(Metadata *MaybeTuple);
 };
 
 class BitcodeReader : public GVMaterializer {
@@ -1118,14 +1138,34 @@ MDNode *BitcodeReaderMetadataList::getMD
 }
 
 void BitcodeReaderMetadataList::tryToResolveCycles() {
-  if (!AnyFwdRefs)
-    // Nothing to do.
-    return;
-
   if (NumFwdRefs)
     // Still forward references... can't resolve cycles.
     return;
 
+  // Give up on finding a full definition for any forward decls that remain.
+  for (const auto &Ref : OldTypeRefs.FwdDecls)
+    OldTypeRefs.Final.insert(Ref);
+  OldTypeRefs.FwdDecls.clear();
+
+  // Upgrade from old type ref arrays.  In strange cases, this could add to
+  // OldTypeRefs.Unknown.
+  for (const auto &Array : OldTypeRefs.Arrays)
+    Array.second->replaceAllUsesWith(resolveTypeRefArray(Array.first.get()));
+
+  // Replace old string-based type refs with the resolved node, if possible.
+  // If we haven't seen the node, leave it to the verifier to complain about
+  // the invalid string reference.
+  for (const auto &Ref : OldTypeRefs.Unknown)
+    if (DICompositeType *CT = OldTypeRefs.Final.lookup(Ref.first))
+      Ref.second->replaceAllUsesWith(CT);
+    else
+      Ref.second->replaceAllUsesWith(Ref.first);
+  OldTypeRefs.Unknown.clear();
+
+  if (!AnyFwdRefs)
+    // Nothing to do.
+    return;
+
   // Resolve any cycles.
   for (unsigned I = MinFwdRef, E = MaxFwdRef + 1; I != E; ++I) {
     auto &MD = MetadataPtrs[I];
@@ -1141,6 +1181,60 @@ void BitcodeReaderMetadataList::tryToRes
   AnyFwdRefs = false;
 }
 
+void BitcodeReaderMetadataList::addTypeRef(MDString &UUID,
+                                           DICompositeType &CT) {
+  assert(CT.getRawIdentifier() == &UUID && "Mismatched UUID");
+  if (CT.isForwardDecl())
+    OldTypeRefs.FwdDecls.insert(std::make_pair(&UUID, &CT));
+  else
+    OldTypeRefs.Final.insert(std::make_pair(&UUID, &CT));
+}
+
+Metadata *BitcodeReaderMetadataList::upgradeTypeRef(Metadata *MaybeUUID) {
+  auto *UUID = dyn_cast_or_null<MDString>(MaybeUUID);
+  if (LLVM_LIKELY(!UUID))
+    return MaybeUUID;
+
+  if (auto *CT = OldTypeRefs.Final.lookup(UUID))
+    return CT;
+
+  auto &Ref = OldTypeRefs.Unknown[UUID];
+  if (!Ref)
+    Ref = MDNode::getTemporary(Context, None);
+  return Ref.get();
+}
+
+Metadata *BitcodeReaderMetadataList::upgradeTypeRefArray(Metadata *MaybeTuple) {
+  auto *Tuple = dyn_cast_or_null<MDTuple>(MaybeTuple);
+  if (!Tuple || Tuple->isDistinct())
+    return MaybeTuple;
+
+  // Look through the array immediately if possible.
+  if (!Tuple->isTemporary())
+    return resolveTypeRefArray(Tuple);
+
+  // Create and return a placeholder to use for now.  Eventually
+  // resolveTypeRefArrays() will be resolve this forward reference.
+  OldTypeRefs.Arrays.emplace_back(
+      std::piecewise_construct, std::make_tuple(Tuple),
+      std::make_tuple(MDTuple::getTemporary(Context, None)));
+  return OldTypeRefs.Arrays.back().second.get();
+}
+
+Metadata *BitcodeReaderMetadataList::resolveTypeRefArray(Metadata *MaybeTuple) {
+  auto *Tuple = dyn_cast_or_null<MDTuple>(MaybeTuple);
+  if (!Tuple || Tuple->isDistinct())
+    return MaybeTuple;
+
+  // Look through the DITypeRefArray, upgrading each DITypeRef.
+  SmallVector<Metadata *, 32> Ops;
+  Ops.reserve(Tuple->getNumOperands());
+  for (Metadata *MD : Tuple->operands())
+    Ops.push_back(upgradeTypeRef(MD));
+
+  return MDTuple::get(Context, Ops);
+}
+
 Type *BitcodeReader::getTypeByID(unsigned ID) {
   // The type table size is always specified correctly.
   if (ID >= TypeList.size())
@@ -2021,6 +2115,11 @@ std::error_code BitcodeReader::parseMeta
     return cast_or_null<MDString>(getMDOrNull(ID));
   };
 
+  // Support for old type refs.
+  auto getDITypeRefOrNull = [&](unsigned ID) {
+    return MetadataList.upgradeTypeRef(getMDOrNull(ID));
+  };
+
 #define GET_OR_DISTINCT(CLASS, ARGS)                                           \
   (IsDistinct ? CLASS::getDistinct ARGS : CLASS::get ARGS)
 
@@ -2234,9 +2333,9 @@ std::error_code BitcodeReader::parseMeta
           GET_OR_DISTINCT(DIDerivedType,
                           (Context, Record[1], getMDString(Record[2]),
                            getMDOrNull(Record[3]), Record[4],
-                           getMDOrNull(Record[5]), getMDOrNull(Record[6]),
-                           Record[7], Record[8], Record[9], Record[10],
-                           getMDOrNull(Record[11]))),
+                           getDITypeRefOrNull(Record[5]),
+                           getDITypeRefOrNull(Record[6]), Record[7], Record[8],
+                           Record[9], Record[10], getMDOrNull(Record[11]))),
           NextMetadataNo++);
       break;
     }
@@ -2246,20 +2345,21 @@ std::error_code BitcodeReader::parseMeta
 
       // If we have a UUID and this is not a forward declaration, lookup the
       // mapping.
-      IsDistinct = Record[0];
+      IsDistinct = Record[0] & 0x1;
+      bool IsNotUsedInTypeRef = Record[0] >= 2;
       unsigned Tag = Record[1];
       MDString *Name = getMDString(Record[2]);
       Metadata *File = getMDOrNull(Record[3]);
       unsigned Line = Record[4];
-      Metadata *Scope = getMDOrNull(Record[5]);
-      Metadata *BaseType = getMDOrNull(Record[6]);
+      Metadata *Scope = getDITypeRefOrNull(Record[5]);
+      Metadata *BaseType = getDITypeRefOrNull(Record[6]);
       uint64_t SizeInBits = Record[7];
       uint64_t AlignInBits = Record[8];
       uint64_t OffsetInBits = Record[9];
       unsigned Flags = Record[10];
       Metadata *Elements = getMDOrNull(Record[11]);
       unsigned RuntimeLang = Record[12];
-      Metadata *VTableHolder = getMDOrNull(Record[13]);
+      Metadata *VTableHolder = getDITypeRefOrNull(Record[13]);
       Metadata *TemplateParams = getMDOrNull(Record[14]);
       auto *Identifier = getMDString(Record[15]);
       DICompositeType *CT = nullptr;
@@ -2276,6 +2376,8 @@ std::error_code BitcodeReader::parseMeta
                               SizeInBits, AlignInBits, OffsetInBits, Flags,
                               Elements, RuntimeLang, VTableHolder,
                               TemplateParams, Identifier));
+      if (!IsNotUsedInTypeRef && Identifier)
+        MetadataList.addTypeRef(*Identifier, *cast<DICompositeType>(CT));
 
       MetadataList.assignValue(CT, NextMetadataNo++);
       break;
@@ -2284,10 +2386,14 @@ std::error_code BitcodeReader::parseMeta
       if (Record.size() != 3)
         return error("Invalid record");
 
-      IsDistinct = Record[0];
+      IsDistinct = Record[0] & 0x1;
+      bool IsOldTypeRefArray = Record[0] < 2;
+      Metadata *Types = getMDOrNull(Record[2]);
+      if (LLVM_UNLIKELY(IsOldTypeRefArray))
+        Types = MetadataList.upgradeTypeRefArray(Types);
+
       MetadataList.assignValue(
-          GET_OR_DISTINCT(DISubroutineType,
-                          (Context, Record[1], getMDOrNull(Record[2]))),
+          GET_OR_DISTINCT(DISubroutineType, (Context, Record[1], Types)),
           NextMetadataNo++);
       break;
     }
@@ -2354,10 +2460,10 @@ std::error_code BitcodeReader::parseMeta
       bool HasCU = Offset && !HasFn;
       DISubprogram *SP = GET_OR_DISTINCT(
           DISubprogram,
-          (Context, getMDOrNull(Record[1]), getMDString(Record[2]),
+          (Context, getDITypeRefOrNull(Record[1]), getMDString(Record[2]),
            getMDString(Record[3]), getMDOrNull(Record[4]), Record[5],
            getMDOrNull(Record[6]), Record[7], Record[8], Record[9],
-           getMDOrNull(Record[10]), Record[11], Record[12], Record[13],
+           getDITypeRefOrNull(Record[10]), Record[11], Record[12], Record[13],
            Record[14], HasCU ? CUorFn : nullptr,
            getMDOrNull(Record[15 + Offset]), getMDOrNull(Record[16 + Offset]),
            getMDOrNull(Record[17 + Offset])));
@@ -2444,7 +2550,7 @@ std::error_code BitcodeReader::parseMeta
       IsDistinct = Record[0];
       MetadataList.assignValue(GET_OR_DISTINCT(DITemplateTypeParameter,
                                                (Context, getMDString(Record[1]),
-                                                getMDOrNull(Record[2]))),
+                                                getDITypeRefOrNull(Record[2]))),
                                NextMetadataNo++);
       break;
     }
@@ -2456,7 +2562,8 @@ std::error_code BitcodeReader::parseMeta
       MetadataList.assignValue(
           GET_OR_DISTINCT(DITemplateValueParameter,
                           (Context, Record[1], getMDString(Record[2]),
-                           getMDOrNull(Record[3]), getMDOrNull(Record[4]))),
+                           getDITypeRefOrNull(Record[3]),
+                           getMDOrNull(Record[4]))),
           NextMetadataNo++);
       break;
     }
@@ -2470,7 +2577,7 @@ std::error_code BitcodeReader::parseMeta
                           (Context, getMDOrNull(Record[1]),
                            getMDString(Record[2]), getMDString(Record[3]),
                            getMDOrNull(Record[4]), Record[5],
-                           getMDOrNull(Record[6]), Record[7], Record[8],
+                           getDITypeRefOrNull(Record[6]), Record[7], Record[8],
                            getMDOrNull(Record[9]), getMDOrNull(Record[10]))),
           NextMetadataNo++);
       break;
@@ -2489,8 +2596,8 @@ std::error_code BitcodeReader::parseMeta
                           (Context, getMDOrNull(Record[1 + HasTag]),
                            getMDString(Record[2 + HasTag]),
                            getMDOrNull(Record[3 + HasTag]), Record[4 + HasTag],
-                           getMDOrNull(Record[5 + HasTag]), Record[6 + HasTag],
-                           Record[7 + HasTag])),
+                           getDITypeRefOrNull(Record[5 + HasTag]),
+                           Record[6 + HasTag], Record[7 + HasTag])),
           NextMetadataNo++);
       break;
     }
@@ -2515,7 +2622,7 @@ std::error_code BitcodeReader::parseMeta
                           (Context, getMDString(Record[1]),
                            getMDOrNull(Record[2]), Record[3],
                            getMDString(Record[4]), getMDString(Record[5]),
-                           Record[6], getMDOrNull(Record[7]))),
+                           Record[6], getDITypeRefOrNull(Record[7]))),
           NextMetadataNo++);
       break;
     }
@@ -2527,7 +2634,7 @@ std::error_code BitcodeReader::parseMeta
       MetadataList.assignValue(
           GET_OR_DISTINCT(DIImportedEntity,
                           (Context, Record[1], getMDOrNull(Record[2]),
-                           getMDOrNull(Record[3]), Record[4],
+                           getDITypeRefOrNull(Record[3]), Record[4],
                            getMDString(Record[5]))),
           NextMetadataNo++);
       break;

Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Sat Apr 23 16:08:00 2016
@@ -1273,7 +1273,8 @@ void ModuleBitcodeWriter::writeDIDerived
 void ModuleBitcodeWriter::writeDICompositeType(
     const DICompositeType *N, SmallVectorImpl<uint64_t> &Record,
     unsigned Abbrev) {
-  Record.push_back(N->isDistinct());
+  const unsigned IsNotUsedInOldTypeRef = 0x2;
+  Record.push_back(IsNotUsedInOldTypeRef | N->isDistinct());
   Record.push_back(N->getTag());
   Record.push_back(VE.getMetadataOrNullID(N->getRawName()));
   Record.push_back(VE.getMetadataOrNullID(N->getFile()));
@@ -1297,7 +1298,8 @@ void ModuleBitcodeWriter::writeDIComposi
 void ModuleBitcodeWriter::writeDISubroutineType(
     const DISubroutineType *N, SmallVectorImpl<uint64_t> &Record,
     unsigned Abbrev) {
-  Record.push_back(N->isDistinct());
+  const unsigned HasNoOldTypeRefs = 0x2;
+  Record.push_back(HasNoOldTypeRefs | N->isDistinct());
   Record.push_back(N->getFlags());
   Record.push_back(VE.getMetadataOrNullID(N->getTypeArray().get()));
 

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat Apr 23 16:08:00 2016
@@ -145,21 +145,13 @@ bool DebugLocDwarfExpression::isFrameReg
 
 //===----------------------------------------------------------------------===//
 
-/// resolve - Look in the DwarfDebug map for the MDNode that
-/// corresponds to the reference.
-template <typename T> T *DbgVariable::resolve(TypedDINodeRef<T> Ref) const {
-  return DD->resolve(Ref);
-}
-
 bool DbgVariable::isBlockByrefVariable() const {
   assert(Var && "Invalid complex DbgVariable!");
-  return Var->getType()
-      .resolve(DD->getTypeIdentifierMap())
-      ->isBlockByrefStruct();
+  return Var->getType().resolve()->isBlockByrefStruct();
 }
 
 const DIType *DbgVariable::getType() const {
-  DIType *Ty = Var->getType().resolve(DD->getTypeIdentifierMap());
+  DIType *Ty = Var->getType().resolve();
   // FIXME: isBlockByrefVariable should be reformulated in terms of complex
   // addresses instead.
   if (Ty->isBlockByrefStruct()) {
@@ -474,7 +466,6 @@ void DwarfDebug::beginModule() {
 
   const Module *M = MMI->getModule();
 
-  TypeIdentifierMap = generateDITypeIdentifierMap(*M);
   unsigned NumDebugCUs = 0;
   for (DICompileUnit *CUNode : M->debug_compile_units()) {
     (void)CUNode;
@@ -494,12 +485,12 @@ void DwarfDebug::beginModule() {
     for (auto *Ty : CUNode->getEnumTypes()) {
       // The enum types array by design contains pointers to
       // MDNodes rather than DIRefs. Unique them here.
-      CU.getOrCreateTypeDIE(cast<DIType>(resolve(Ty->getRef())));
+      CU.getOrCreateTypeDIE(cast<DIType>(Ty));
     }
     for (auto *Ty : CUNode->getRetainedTypes()) {
       // The retained types array by design contains pointers to
       // MDNodes rather than DIRefs. Unique them here.
-      if (DIType *RT = dyn_cast<DIType>(resolve(Ty->getRef())))
+      if (DIType *RT = dyn_cast<DIType>(Ty))
         if (!RT->isExternalTypeRef())
           // There is no point in force-emitting a forward declaration.
           CU.getOrCreateTypeDIE(RT);
@@ -705,7 +696,7 @@ DbgVariable *DwarfDebug::getExistingAbst
 
 void DwarfDebug::createAbstractVariable(const DILocalVariable *Var,
                                         LexicalScope *Scope) {
-  auto AbsDbgVariable = make_unique<DbgVariable>(Var, /* IA */ nullptr, this);
+  auto AbsDbgVariable = make_unique<DbgVariable>(Var, /* IA */ nullptr);
   InfoHolder.addScopeVariable(Scope, AbsDbgVariable.get());
   AbstractVariables[Var] = std::move(AbsDbgVariable);
 }
@@ -749,7 +740,7 @@ void DwarfDebug::collectVariableInfoFrom
       continue;
 
     ensureAbstractVariableIsCreatedIfScoped(Var, Scope->getScopeNode());
-    auto RegVar = make_unique<DbgVariable>(Var.first, Var.second, this);
+    auto RegVar = make_unique<DbgVariable>(Var.first, Var.second);
     RegVar->initializeMMI(VI.Expr, VI.Slot);
     if (InfoHolder.addScopeVariable(Scope, RegVar.get()))
       ConcreteVariables.push_back(std::move(RegVar));
@@ -923,8 +914,7 @@ DwarfDebug::buildLocationList(SmallVecto
 DbgVariable *DwarfDebug::createConcreteVariable(LexicalScope &Scope,
                                                 InlinedVariable IV) {
   ensureAbstractVariableIsCreatedIfScoped(IV, Scope.getScopeNode());
-  ConcreteVariables.push_back(
-      make_unique<DbgVariable>(IV.first, IV.second, this));
+  ConcreteVariables.push_back(make_unique<DbgVariable>(IV.first, IV.second));
   InfoHolder.addScopeVariable(&Scope, ConcreteVariables.back().get());
   return ConcreteVariables.back().get();
 }

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Sat Apr 23 16:08:00 2016
@@ -68,15 +68,14 @@ class DbgVariable {
   unsigned DebugLocListIndex = ~0u;          /// Offset in DebugLocs.
   const MachineInstr *MInsn = nullptr;       /// DBG_VALUE instruction.
   SmallVector<int, 1> FrameIndex;            /// Frame index.
-  DwarfDebug *DD;
 
 public:
   /// Construct a DbgVariable.
   ///
   /// Creates a variable without any DW_AT_location.  Call \a initializeMMI()
   /// for MMI entries, or \a initializeDbgValue() for DBG_VALUE instructions.
-  DbgVariable(const DILocalVariable *V, const DILocation *IA, DwarfDebug *DD)
-      : Var(V), IA(IA), DD(DD) {}
+  DbgVariable(const DILocalVariable *V, const DILocation *IA)
+      : Var(V), IA(IA) {}
 
   /// Initialize from the MMI table.
   void initializeMMI(const DIExpression *E, int FI) {
@@ -177,9 +176,9 @@ public:
   const DIType *getType() const;
 
 private:
-  /// Look in the DwarfDebug map for the MDNode that
-  /// corresponds to the reference.
-  template <typename T> T *resolve(TypedDINodeRef<T> Ref) const;
+  template <typename T> T *resolve(TypedDINodeRef<T> Ref) const {
+    return Ref.resolve();
+  }
 };
 
 
@@ -255,9 +254,6 @@ class DwarfDebug : public DebugHandlerBa
   /// Version of dwarf we're emitting.
   unsigned DwarfVersion;
 
-  /// Maps from a type identifier to the actual MDNode.
-  DITypeIdentifierMap TypeIdentifierMap;
-
   /// DWARF5 Experimental Options
   /// @{
   bool HasDwarfAccelTables;
@@ -525,12 +521,7 @@ public:
 
   /// Find the MDNode for the given reference.
   template <typename T> T *resolve(TypedDINodeRef<T> Ref) const {
-    return Ref.resolve(TypeIdentifierMap);
-  }
-
-  /// Return the TypeIdentifierMap.
-  const DITypeIdentifierMap &getTypeIdentifierMap() const {
-    return TypeIdentifierMap;
+    return Ref.resolve();
   }
 
   /// Find the DwarfCompileUnit for the given CU Die.

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Sat Apr 23 16:08:00 2016
@@ -718,8 +718,6 @@ DIE *DwarfUnit::getOrCreateTypeDIE(const
     return nullptr;
 
   auto *Ty = cast<DIType>(TyNode);
-  assert(Ty == resolve(Ty->getRef()) &&
-         "type was not uniqued, possible ODR violation.");
 
   // DW_TAG_restrict_type is not supported in DWARF2
   if (Ty->getTag() == dwarf::DW_TAG_restrict_type && DD->getDwarfVersion() <= 2)

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h Sat Apr 23 16:08:00 2016
@@ -328,7 +328,7 @@ protected:
   /// Look in the DwarfDebug map for the MDNode that corresponds to the
   /// reference.
   template <typename T> T *resolve(TypedDINodeRef<T> Ref) const {
-    return DD->resolve(Ref);
+    return Ref.resolve();
   }
 
 private:

Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Sat Apr 23 16:08:00 2016
@@ -206,8 +206,7 @@ DIImportedEntity *DIBuilder::createImpor
   // Make sure to use the unique identifier based metadata reference for
   // types that have one.
   return ::createImportedModule(VMContext, dwarf::DW_TAG_imported_declaration,
-                                Context, DINodeRef::get(Decl), Line, Name,
-                                AllImportedModules);
+                                Context, Decl, Line, Name, AllImportedModules);
 }
 
 DIFile *DIBuilder::createFile(StringRef Filename, StringRef Directory) {
@@ -237,8 +236,8 @@ DIBasicType *DIBuilder::createBasicType(
 }
 
 DIDerivedType *DIBuilder::createQualifiedType(unsigned Tag, DIType *FromTy) {
-  return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr,
-                            DITypeRef::get(FromTy), 0, 0, 0, 0);
+  return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr, FromTy, 0,
+                            0, 0, 0);
 }
 
 DIDerivedType *DIBuilder::createPointerType(DIType *PointeeTy,
@@ -247,8 +246,8 @@ DIDerivedType *DIBuilder::createPointerT
                                             StringRef Name) {
   // FIXME: Why is there a name here?
   return DIDerivedType::get(VMContext, dwarf::DW_TAG_pointer_type, Name,
-                            nullptr, 0, nullptr, DITypeRef::get(PointeeTy),
-                            SizeInBits, AlignInBits, 0, 0);
+                            nullptr, 0, nullptr, PointeeTy, SizeInBits,
+                            AlignInBits, 0, 0);
 }
 
 DIDerivedType *DIBuilder::createMemberPointerType(DIType *PointeeTy,
@@ -256,34 +255,31 @@ DIDerivedType *DIBuilder::createMemberPo
                                                   uint64_t SizeInBits,
                                                   uint64_t AlignInBits) {
   return DIDerivedType::get(VMContext, dwarf::DW_TAG_ptr_to_member_type, "",
-                            nullptr, 0, nullptr, DITypeRef::get(PointeeTy),
-                            SizeInBits, AlignInBits, 0, 0,
-                            DITypeRef::get(Base));
+                            nullptr, 0, nullptr, PointeeTy, SizeInBits,
+                            AlignInBits, 0, 0, Base);
 }
 
 DIDerivedType *DIBuilder::createReferenceType(unsigned Tag, DIType *RTy,
                                               uint64_t SizeInBits,
                                               uint64_t AlignInBits) {
   assert(RTy && "Unable to create reference type");
-  return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr,
-                            DITypeRef::get(RTy), SizeInBits, AlignInBits, 0, 0);
+  return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr, RTy,
+                            SizeInBits, AlignInBits, 0, 0);
 }
 
 DIDerivedType *DIBuilder::createTypedef(DIType *Ty, StringRef Name,
                                         DIFile *File, unsigned LineNo,
                                         DIScope *Context) {
   return DIDerivedType::get(VMContext, dwarf::DW_TAG_typedef, Name, File,
-                            LineNo,
-                            DIScopeRef::get(getNonCompileUnitScope(Context)),
-                            DITypeRef::get(Ty), 0, 0, 0, 0);
+                            LineNo, getNonCompileUnitScope(Context), Ty, 0, 0,
+                            0, 0);
 }
 
 DIDerivedType *DIBuilder::createFriend(DIType *Ty, DIType *FriendTy) {
   assert(Ty && "Invalid type!");
   assert(FriendTy && "Invalid friend type!");
-  return DIDerivedType::get(VMContext, dwarf::DW_TAG_friend, "", nullptr, 0,
-                            DITypeRef::get(Ty), DITypeRef::get(FriendTy), 0, 0,
-                            0, 0);
+  return DIDerivedType::get(VMContext, dwarf::DW_TAG_friend, "", nullptr, 0, Ty,
+                            FriendTy, 0, 0, 0, 0);
 }
 
 DIDerivedType *DIBuilder::createInheritance(DIType *Ty, DIType *BaseTy,
@@ -291,8 +287,7 @@ DIDerivedType *DIBuilder::createInherita
                                             unsigned Flags) {
   assert(Ty && "Unable to create inheritance");
   return DIDerivedType::get(VMContext, dwarf::DW_TAG_inheritance, "", nullptr,
-                            0, DITypeRef::get(Ty), DITypeRef::get(BaseTy), 0, 0,
-                            BaseOffset, Flags);
+                            0, Ty, BaseTy, 0, 0, BaseOffset, Flags);
 }
 
 DIDerivedType *DIBuilder::createMemberType(DIScope *Scope, StringRef Name,
@@ -301,10 +296,9 @@ DIDerivedType *DIBuilder::createMemberTy
                                            uint64_t AlignInBits,
                                            uint64_t OffsetInBits,
                                            unsigned Flags, DIType *Ty) {
-  return DIDerivedType::get(
-      VMContext, dwarf::DW_TAG_member, Name, File, LineNumber,
-      DIScopeRef::get(getNonCompileUnitScope(Scope)), DITypeRef::get(Ty),
-      SizeInBits, AlignInBits, OffsetInBits, Flags);
+  return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File,
+                            LineNumber, getNonCompileUnitScope(Scope), Ty,
+                            SizeInBits, AlignInBits, OffsetInBits, Flags);
 }
 
 static ConstantAsMetadata *getConstantOrNull(Constant *C) {
@@ -319,10 +313,9 @@ DIDerivedType *DIBuilder::createStaticMe
                                                  DIType *Ty, unsigned Flags,
                                                  llvm::Constant *Val) {
   Flags |= DINode::FlagStaticMember;
-  return DIDerivedType::get(
-      VMContext, dwarf::DW_TAG_member, Name, File, LineNumber,
-      DIScopeRef::get(getNonCompileUnitScope(Scope)), DITypeRef::get(Ty), 0, 0,
-      0, Flags, getConstantOrNull(Val));
+  return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File,
+                            LineNumber, getNonCompileUnitScope(Scope), Ty, 0, 0,
+                            0, Flags, getConstantOrNull(Val));
 }
 
 DIDerivedType *DIBuilder::createObjCIVar(StringRef Name, DIFile *File,
@@ -331,10 +324,10 @@ DIDerivedType *DIBuilder::createObjCIVar
                                          uint64_t AlignInBits,
                                          uint64_t OffsetInBits, unsigned Flags,
                                          DIType *Ty, MDNode *PropertyNode) {
-  return DIDerivedType::get(
-      VMContext, dwarf::DW_TAG_member, Name, File, LineNumber,
-      DIScopeRef::get(getNonCompileUnitScope(File)), DITypeRef::get(Ty),
-      SizeInBits, AlignInBits, OffsetInBits, Flags, PropertyNode);
+  return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File,
+                            LineNumber, getNonCompileUnitScope(File), Ty,
+                            SizeInBits, AlignInBits, OffsetInBits, Flags,
+                            PropertyNode);
 }
 
 DIObjCProperty *
@@ -342,15 +335,14 @@ DIBuilder::createObjCProperty(StringRef
                               StringRef GetterName, StringRef SetterName,
                               unsigned PropertyAttributes, DIType *Ty) {
   return DIObjCProperty::get(VMContext, Name, File, LineNumber, GetterName,
-                             SetterName, PropertyAttributes,
-                             DITypeRef::get(Ty));
+                             SetterName, PropertyAttributes, Ty);
 }
 
 DITemplateTypeParameter *
 DIBuilder::createTemplateTypeParameter(DIScope *Context, StringRef Name,
                                        DIType *Ty) {
   assert((!Context || isa<DICompileUnit>(Context)) && "Expected compile unit");
-  return DITemplateTypeParameter::get(VMContext, Name, DITypeRef::get(Ty));
+  return DITemplateTypeParameter::get(VMContext, Name, Ty);
 }
 
 static DITemplateValueParameter *
@@ -358,8 +350,7 @@ createTemplateValueParameterHelper(LLVMC
                                    DIScope *Context, StringRef Name, DIType *Ty,
                                    Metadata *MD) {
   assert((!Context || isa<DICompileUnit>(Context)) && "Expected compile unit");
-  return DITemplateValueParameter::get(VMContext, Tag, Name, DITypeRef::get(Ty),
-                                       MD);
+  return DITemplateValueParameter::get(VMContext, Tag, Name, Ty, MD);
 }
 
 DITemplateValueParameter *
@@ -396,12 +387,9 @@ DICompositeType *DIBuilder::createClassT
 
   auto *R = DICompositeType::get(
       VMContext, dwarf::DW_TAG_structure_type, Name, File, LineNumber,
-      DIScopeRef::get(getNonCompileUnitScope(Context)),
-      DITypeRef::get(DerivedFrom), SizeInBits, AlignInBits, OffsetInBits, Flags,
-      Elements, 0, DITypeRef::get(VTableHolder),
+      getNonCompileUnitScope(Context), DerivedFrom, SizeInBits, AlignInBits,
+      OffsetInBits, Flags, Elements, 0, VTableHolder,
       cast_or_null<MDTuple>(TemplateParams), UniqueIdentifier);
-  if (!UniqueIdentifier.empty())
-    retainType(R);
   trackIfUnresolved(R);
   return R;
 }
@@ -413,11 +401,8 @@ DICompositeType *DIBuilder::createStruct
     DIType *VTableHolder, StringRef UniqueIdentifier) {
   auto *R = DICompositeType::get(
       VMContext, dwarf::DW_TAG_structure_type, Name, File, LineNumber,
-      DIScopeRef::get(getNonCompileUnitScope(Context)),
-      DITypeRef::get(DerivedFrom), SizeInBits, AlignInBits, 0, Flags, Elements,
-      RunTimeLang, DITypeRef::get(VTableHolder), nullptr, UniqueIdentifier);
-  if (!UniqueIdentifier.empty())
-    retainType(R);
+      getNonCompileUnitScope(Context), DerivedFrom, SizeInBits, AlignInBits, 0,
+      Flags, Elements, RunTimeLang, VTableHolder, nullptr, UniqueIdentifier);
   trackIfUnresolved(R);
   return R;
 }
@@ -428,11 +413,8 @@ DICompositeType *DIBuilder::createUnionT
     DINodeArray Elements, unsigned RunTimeLang, StringRef UniqueIdentifier) {
   auto *R = DICompositeType::get(
       VMContext, dwarf::DW_TAG_union_type, Name, File, LineNumber,
-      DIScopeRef::get(getNonCompileUnitScope(Scope)), nullptr, SizeInBits,
-      AlignInBits, 0, Flags, Elements, RunTimeLang, nullptr, nullptr,
-      UniqueIdentifier);
-  if (!UniqueIdentifier.empty())
-    retainType(R);
+      getNonCompileUnitScope(Scope), nullptr, SizeInBits, AlignInBits, 0, Flags,
+      Elements, RunTimeLang, nullptr, nullptr, UniqueIdentifier);
   trackIfUnresolved(R);
   return R;
 }
@@ -445,13 +427,9 @@ DISubroutineType *DIBuilder::createSubro
 DICompositeType *DIBuilder::createExternalTypeRef(unsigned Tag, DIFile *File,
                                                   StringRef UniqueIdentifier) {
   assert(!UniqueIdentifier.empty() && "external type ref without uid");
-  auto *CTy =
-      DICompositeType::get(VMContext, Tag, "", nullptr, 0, nullptr, nullptr, 0,
-                           0, 0, DINode::FlagExternalTypeRef, nullptr, 0,
-                           nullptr, nullptr, UniqueIdentifier);
-  // Types with unique IDs need to be in the type map.
-  retainType(CTy);
-  return CTy;
+  return DICompositeType::get(VMContext, Tag, "", nullptr, 0, nullptr, nullptr,
+                              0, 0, 0, DINode::FlagExternalTypeRef, nullptr, 0,
+                              nullptr, nullptr, UniqueIdentifier);
 }
 
 DICompositeType *DIBuilder::createEnumerationType(
@@ -460,12 +438,9 @@ DICompositeType *DIBuilder::createEnumer
     DIType *UnderlyingType, StringRef UniqueIdentifier) {
   auto *CTy = DICompositeType::get(
       VMContext, dwarf::DW_TAG_enumeration_type, Name, File, LineNumber,
-      DIScopeRef::get(getNonCompileUnitScope(Scope)),
-      DITypeRef::get(UnderlyingType), SizeInBits, AlignInBits, 0, 0, Elements,
-      0, nullptr, nullptr, UniqueIdentifier);
+      getNonCompileUnitScope(Scope), UnderlyingType, SizeInBits, AlignInBits, 0,
+      0, Elements, 0, nullptr, nullptr, UniqueIdentifier);
   AllEnumTypes.push_back(CTy);
-  if (!UniqueIdentifier.empty())
-    retainType(CTy);
   trackIfUnresolved(CTy);
   return CTy;
 }
@@ -474,8 +449,8 @@ DICompositeType *DIBuilder::createArrayT
                                             DIType *Ty,
                                             DINodeArray Subscripts) {
   auto *R = DICompositeType::get(VMContext, dwarf::DW_TAG_array_type, "",
-                                 nullptr, 0, nullptr, DITypeRef::get(Ty), Size,
-                                 AlignInBits, 0, 0, Subscripts, 0, nullptr);
+                                 nullptr, 0, nullptr, Ty, Size, AlignInBits, 0,
+                                 0, Subscripts, 0, nullptr);
   trackIfUnresolved(R);
   return R;
 }
@@ -483,10 +458,9 @@ DICompositeType *DIBuilder::createArrayT
 DICompositeType *DIBuilder::createVectorType(uint64_t Size,
                                              uint64_t AlignInBits, DIType *Ty,
                                              DINodeArray Subscripts) {
-  auto *R =
-      DICompositeType::get(VMContext, dwarf::DW_TAG_array_type, "", nullptr, 0,
-                           nullptr, DITypeRef::get(Ty), Size, AlignInBits, 0,
-                           DINode::FlagVector, Subscripts, 0, nullptr);
+  auto *R = DICompositeType::get(VMContext, dwarf::DW_TAG_array_type, "",
+                                 nullptr, 0, nullptr, Ty, Size, AlignInBits, 0,
+                                 DINode::FlagVector, Subscripts, 0, nullptr);
   trackIfUnresolved(R);
   return R;
 }
@@ -531,12 +505,9 @@ DIBuilder::createForwardDecl(unsigned Ta
   // FIXME: Define in terms of createReplaceableForwardDecl() by calling
   // replaceWithUniqued().
   auto *RetTy = DICompositeType::get(
-      VMContext, Tag, Name, F, Line,
-      DIScopeRef::get(getNonCompileUnitScope(Scope)), nullptr, SizeInBits,
-      AlignInBits, 0, DINode::FlagFwdDecl, nullptr, RuntimeLang, nullptr,
-      nullptr, UniqueIdentifier);
-  if (!UniqueIdentifier.empty())
-    retainType(RetTy);
+      VMContext, Tag, Name, F, Line, getNonCompileUnitScope(Scope), nullptr,
+      SizeInBits, AlignInBits, 0, DINode::FlagFwdDecl, nullptr, RuntimeLang,
+      nullptr, nullptr, UniqueIdentifier);
   trackIfUnresolved(RetTy);
   return RetTy;
 }
@@ -545,14 +516,12 @@ DICompositeType *DIBuilder::createReplac
     unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line,
     unsigned RuntimeLang, uint64_t SizeInBits, uint64_t AlignInBits,
     unsigned Flags, StringRef UniqueIdentifier) {
-  auto *RetTy = DICompositeType::getTemporary(
-                    VMContext, Tag, Name, F, Line,
-                    DIScopeRef::get(getNonCompileUnitScope(Scope)), nullptr,
-                    SizeInBits, AlignInBits, 0, Flags, nullptr, RuntimeLang,
-                    nullptr, nullptr, UniqueIdentifier)
-                    .release();
-  if (!UniqueIdentifier.empty())
-    retainType(RetTy);
+  auto *RetTy =
+      DICompositeType::getTemporary(
+          VMContext, Tag, Name, F, Line, getNonCompileUnitScope(Scope), nullptr,
+          SizeInBits, AlignInBits, 0, Flags, nullptr, RuntimeLang, nullptr,
+          nullptr, UniqueIdentifier)
+          .release();
   trackIfUnresolved(RetTy);
   return RetTy;
 }
@@ -565,7 +534,7 @@ DITypeRefArray DIBuilder::getOrCreateTyp
   SmallVector<llvm::Metadata *, 16> Elts;
   for (unsigned i = 0, e = Elements.size(); i != e; ++i) {
     if (Elements[i] && isa<MDNode>(Elements[i]))
-      Elts.push_back(DITypeRef::get(cast<DIType>(Elements[i])));
+      Elts.push_back(cast<DIType>(Elements[i]));
     else
       Elts.push_back(Elements[i]);
   }
@@ -591,10 +560,10 @@ DIGlobalVariable *DIBuilder::createGloba
     MDNode *Decl) {
   checkGlobalVariableScope(Context);
 
-  auto *N = DIGlobalVariable::get(VMContext, cast_or_null<DIScope>(Context),
-                                  Name, LinkageName, F, LineNumber,
-                                  DITypeRef::get(Ty), isLocalToUnit, true, Val,
-                                  cast_or_null<DIDerivedType>(Decl));
+  auto *N =
+      DIGlobalVariable::get(VMContext, cast_or_null<DIScope>(Context), Name,
+                            LinkageName, F, LineNumber, Ty, isLocalToUnit, true,
+                            Val, cast_or_null<DIDerivedType>(Decl));
   AllGVs.push_back(N);
   return N;
 }
@@ -607,7 +576,7 @@ DIGlobalVariable *DIBuilder::createTempG
 
   return DIGlobalVariable::getTemporary(
              VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F,
-             LineNumber, DITypeRef::get(Ty), isLocalToUnit, false, Val,
+             LineNumber, Ty, isLocalToUnit, false, Val,
              cast_or_null<DIDerivedType>(Decl))
       .release();
 }
@@ -625,7 +594,7 @@ static DILocalVariable *createLocalVaria
 
   auto *Node =
       DILocalVariable::get(VMContext, cast_or_null<DILocalScope>(Context), Name,
-                           File, LineNo, DITypeRef::get(Ty), ArgNo, Flags);
+                           File, LineNo, Ty, ArgNo, Flags);
   if (AlwaysPreserve) {
     // The optimizer may remove local variables. If there is an interest
     // to preserve variable info in such situation then stash it in a
@@ -684,9 +653,9 @@ DISubprogram *DIBuilder::createFunction(
     DITemplateParameterArray TParams, DISubprogram *Decl) {
   auto *Node = getSubprogram(
       /* IsDistinct = */ isDefinition, VMContext,
-      DIScopeRef::get(getNonCompileUnitScope(Context)), Name, LinkageName, File,
-      LineNo, Ty, isLocalToUnit, isDefinition, ScopeLine, nullptr, 0, 0, Flags,
-      isOptimized, isDefinition ? CUNode : nullptr, TParams, Decl,
+      getNonCompileUnitScope(Context), Name, LinkageName, File, LineNo, Ty,
+      isLocalToUnit, isDefinition, ScopeLine, nullptr, 0, 0, Flags, isOptimized,
+      isDefinition ? CUNode : nullptr, TParams, Decl,
       MDTuple::getTemporary(VMContext, None).release());
 
   if (isDefinition)
@@ -701,10 +670,10 @@ DISubprogram *DIBuilder::createTempFunct
     bool isDefinition, unsigned ScopeLine, unsigned Flags, bool isOptimized,
     DITemplateParameterArray TParams, DISubprogram *Decl) {
   return DISubprogram::getTemporary(
-             VMContext, DIScopeRef::get(getNonCompileUnitScope(Context)), Name,
-             LinkageName, File, LineNo, Ty, isLocalToUnit, isDefinition,
-             ScopeLine, nullptr, 0, 0, Flags, isOptimized,
-             isDefinition ? CUNode : nullptr, TParams, Decl, nullptr)
+             VMContext, getNonCompileUnitScope(Context), Name, LinkageName,
+             File, LineNo, Ty, isLocalToUnit, isDefinition, ScopeLine, nullptr,
+             0, 0, Flags, isOptimized, isDefinition ? CUNode : nullptr, TParams,
+             Decl, nullptr)
       .release();
 }
 
@@ -719,11 +688,10 @@ DIBuilder::createMethod(DIScope *Context
          "the compile unit.");
   // FIXME: Do we want to use different scope/lines?
   auto *SP = getSubprogram(
-      /* IsDistinct = */ isDefinition, VMContext,
-      DIScopeRef::get(cast<DIScope>(Context)), Name, LinkageName, F, LineNo, Ty,
-      isLocalToUnit, isDefinition, LineNo, DITypeRef::get(VTableHolder), VK,
-      VIndex, Flags, isOptimized, isDefinition ? CUNode : nullptr, TParams,
-      nullptr, nullptr);
+      /* IsDistinct = */ isDefinition, VMContext, cast<DIScope>(Context), Name,
+      LinkageName, F, LineNo, Ty, isLocalToUnit, isDefinition, LineNo,
+      VTableHolder, VK, VIndex, Flags, isOptimized,
+      isDefinition ? CUNode : nullptr, TParams, nullptr, nullptr);
 
   if (isDefinition)
     AllSubprograms.push_back(SP);
@@ -863,7 +831,7 @@ void DIBuilder::replaceVTableHolder(DICo
                                     DICompositeType *VTableHolder) {
   {
     TypedTrackingMDRef<DICompositeType> N(T);
-    N->replaceVTableHolder(DITypeRef::get(VTableHolder));
+    N->replaceVTableHolder(VTableHolder);
     T = N.get();
   }
 

Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Sat Apr 23 16:08:00 2016
@@ -37,30 +37,6 @@ DISubprogram *llvm::getDISubprogram(cons
   return nullptr;
 }
 
-DITypeIdentifierMap
-llvm::generateDITypeIdentifierMap(const Module &M) {
-  DITypeIdentifierMap Map;
-  for (DICompileUnit *CU : M.debug_compile_units()) {
-    DINodeArray Retain = CU->getRetainedTypes();
-    for (unsigned Ti = 0, Te = Retain.size(); Ti != Te; ++Ti) {
-      if (!isa<DICompositeType>(Retain[Ti]))
-        continue;
-      auto *Ty = cast<DICompositeType>(Retain[Ti]);
-      if (MDString *TypeId = Ty->getRawIdentifier()) {
-        // Definition has priority over declaration.
-        // Try to insert (TypeId, Ty) to Map.
-        std::pair<DITypeIdentifierMap::iterator, bool> P =
-            Map.insert(std::make_pair(TypeId, Ty));
-        // If TypeId already exists in Map and this is a definition, replace
-        // whatever we had (declaration or definition) with the definition.
-        if (!P.second && !Ty->isForwardDecl())
-          P.first->second = Ty;
-      }
-    }
-  }
-  return Map;
-}
-
 //===----------------------------------------------------------------------===//
 // DebugInfoFinder implementations.
 //===----------------------------------------------------------------------===//
@@ -72,25 +48,15 @@ void DebugInfoFinder::reset() {
   TYs.clear();
   Scopes.clear();
   NodesSeen.clear();
-  TypeIdentifierMap.clear();
-  TypeMapInitialized = false;
-}
-
-void DebugInfoFinder::InitializeTypeMap(const Module &M) {
-  if (TypeMapInitialized)
-    return;
-  TypeIdentifierMap = generateDITypeIdentifierMap(M);
-  TypeMapInitialized = true;
 }
 
 void DebugInfoFinder::processModule(const Module &M) {
-  InitializeTypeMap(M);
   for (auto *CU : M.debug_compile_units()) {
     addCompileUnit(CU);
     for (auto *DIG : CU->getGlobalVariables()) {
       if (addGlobalVariable(DIG)) {
         processScope(DIG->getScope());
-        processType(DIG->getType().resolve(TypeIdentifierMap));
+        processType(DIG->getType().resolve());
       }
     }
     for (auto *ET : CU->getEnumTypes())
@@ -101,7 +67,7 @@ void DebugInfoFinder::processModule(cons
       else
         processSubprogram(cast<DISubprogram>(RT));
     for (auto *Import : CU->getImportedEntities()) {
-      auto *Entity = Import->getEntity().resolve(TypeIdentifierMap);
+      auto *Entity = Import->getEntity().resolve();
       if (auto *T = dyn_cast<DIType>(Entity))
         processType(T);
       else if (auto *SP = dyn_cast<DISubprogram>(Entity))
@@ -120,7 +86,6 @@ void DebugInfoFinder::processModule(cons
 void DebugInfoFinder::processLocation(const Module &M, const DILocation *Loc) {
   if (!Loc)
     return;
-  InitializeTypeMap(M);
   processScope(Loc->getScope());
   processLocation(M, Loc->getInlinedAt());
 }
@@ -128,14 +93,14 @@ void DebugInfoFinder::processLocation(co
 void DebugInfoFinder::processType(DIType *DT) {
   if (!addType(DT))
     return;
-  processScope(DT->getScope().resolve(TypeIdentifierMap));
+  processScope(DT->getScope().resolve());
   if (auto *ST = dyn_cast<DISubroutineType>(DT)) {
     for (DITypeRef Ref : ST->getTypeArray())
-      processType(Ref.resolve(TypeIdentifierMap));
+      processType(Ref.resolve());
     return;
   }
   if (auto *DCT = dyn_cast<DICompositeType>(DT)) {
-    processType(DCT->getBaseType().resolve(TypeIdentifierMap));
+    processType(DCT->getBaseType().resolve());
     for (Metadata *D : DCT->getElements()) {
       if (auto *T = dyn_cast<DIType>(D))
         processType(T);
@@ -145,7 +110,7 @@ void DebugInfoFinder::processType(DIType
     return;
   }
   if (auto *DDT = dyn_cast<DIDerivedType>(DT)) {
-    processType(DDT->getBaseType().resolve(TypeIdentifierMap));
+    processType(DDT->getBaseType().resolve());
   }
 }
 
@@ -178,13 +143,13 @@ void DebugInfoFinder::processScope(DISco
 void DebugInfoFinder::processSubprogram(DISubprogram *SP) {
   if (!addSubprogram(SP))
     return;
-  processScope(SP->getScope().resolve(TypeIdentifierMap));
+  processScope(SP->getScope().resolve());
   processType(SP->getType());
   for (auto *Element : SP->getTemplateParams()) {
     if (auto *TType = dyn_cast<DITemplateTypeParameter>(Element)) {
-      processType(TType->getType().resolve(TypeIdentifierMap));
+      processType(TType->getType().resolve());
     } else if (auto *TVal = dyn_cast<DITemplateValueParameter>(Element)) {
-      processType(TVal->getType().resolve(TypeIdentifierMap));
+      processType(TVal->getType().resolve());
     }
   }
 }
@@ -194,7 +159,6 @@ void DebugInfoFinder::processDeclare(con
   auto *N = dyn_cast<MDNode>(DDI->getVariable());
   if (!N)
     return;
-  InitializeTypeMap(M);
 
   auto *DV = dyn_cast<DILocalVariable>(N);
   if (!DV)
@@ -203,14 +167,13 @@ void DebugInfoFinder::processDeclare(con
   if (!NodesSeen.insert(DV).second)
     return;
   processScope(DV->getScope());
-  processType(DV->getType().resolve(TypeIdentifierMap));
+  processType(DV->getType().resolve());
 }
 
 void DebugInfoFinder::processValue(const Module &M, const DbgValueInst *DVI) {
   auto *N = dyn_cast<MDNode>(DVI->getVariable());
   if (!N)
     return;
-  InitializeTypeMap(M);
 
   auto *DV = dyn_cast<DILocalVariable>(N);
   if (!DV)
@@ -219,7 +182,7 @@ void DebugInfoFinder::processValue(const
   if (!NodesSeen.insert(DV).second)
     return;
   processScope(DV->getScope());
-  processType(DV->getType().resolve(TypeIdentifierMap));
+  processType(DV->getType().resolve());
 }
 
 bool DebugInfoFinder::addType(DIType *DT) {

Modified: llvm/trunk/lib/IR/DebugInfoMetadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfoMetadata.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfoMetadata.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfoMetadata.cpp Sat Apr 23 16:08:00 2016
@@ -115,13 +115,13 @@ DIScopeRef DIScope::getScope() const {
     return SP->getScope();
 
   if (auto *LB = dyn_cast<DILexicalBlockBase>(this))
-    return DIScopeRef(LB->getScope());
+    return LB->getScope();
 
   if (auto *NS = dyn_cast<DINamespace>(this))
-    return DIScopeRef(NS->getScope());
+    return NS->getScope();
 
   if (auto *M = dyn_cast<DIModule>(this))
-    return DIScopeRef(M->getScope());
+    return M->getScope();
 
   assert((isa<DIFile>(this) || isa<DICompileUnit>(this)) &&
          "Unhandled type of scope.");

Modified: llvm/trunk/lib/IR/LLVMContextImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LLVMContextImpl.h?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LLVMContextImpl.h (original)
+++ llvm/trunk/lib/IR/LLVMContextImpl.h Sat Apr 23 16:08:00 2016
@@ -380,8 +380,10 @@ template <> struct MDNodeKeyImpl<DIDeriv
     // If this is a member inside an ODR type, only hash the type and the name.
     // Otherwise the hash will be stronger than
     // MDNodeSubsetEqualImpl::isODRMember().
-    if (Tag == dwarf::DW_TAG_member && Name && Scope && isa<MDString>(Scope))
-      return hash_combine(Name, Scope);
+    if (Tag == dwarf::DW_TAG_member && Name)
+      if (auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
+        if (CT->getRawIdentifier())
+          return hash_combine(Name, Scope);
 
     // Intentionally computes the hash on a subset of the operands for
     // performance reason. The subset has to be significant enough to avoid
@@ -406,7 +408,11 @@ template <> struct MDNodeSubsetEqualImpl
   static bool isODRMember(unsigned Tag, const Metadata *Scope,
                           const MDString *Name, const DIDerivedType *RHS) {
     // Check whether the LHS is eligible.
-    if (Tag != dwarf::DW_TAG_member || !Name || !Scope || !isa<MDString>(Scope))
+    if (Tag != dwarf::DW_TAG_member || !Name)
+      return false;
+
+    auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
+    if (!CT || !CT->getRawIdentifier())
       return false;
 
     // Compare to the RHS.
@@ -571,8 +577,10 @@ template <> struct MDNodeKeyImpl<DISubpr
     // If this is a declaration inside an ODR type, only hash the type and the
     // name.  Otherwise the hash will be stronger than
     // MDNodeSubsetEqualImpl::isDeclarationOfODRMember().
-    if (!IsDefinition && LinkageName && Scope && isa<MDString>(Scope))
-      return hash_combine(LinkageName, Scope);
+    if (!IsDefinition && LinkageName)
+      if (auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
+        if (CT->getRawIdentifier())
+          return hash_combine(LinkageName, Scope);
 
     // Intentionally computes the hash on a subset of the operands for
     // performance reason. The subset has to be significant enough to avoid
@@ -599,8 +607,11 @@ template <> struct MDNodeSubsetEqualImpl
                                        const MDString *LinkageName,
                                        const DISubprogram *RHS) {
     // Check whether the LHS is eligible.
-    if (IsDefinition || !Scope || !LinkageName || !Scope ||
-        !isa<MDString>(Scope))
+    if (IsDefinition || !Scope || !LinkageName)
+      return false;
+
+    auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
+    if (!CT || !CT->getRawIdentifier())
       return false;
 
     // Compare to the RHS.

Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Sat Apr 23 16:08:00 2016
@@ -203,9 +203,6 @@ class Verifier : public InstVisitor<Veri
   /// Track all DICompileUnits visited.
   SmallPtrSet<const Metadata *, 2> CUVisited;
 
-  /// \brief Track unresolved string-based type references.
-  SmallDenseMap<const MDString *, const MDNode *, 32> UnresolvedTypeRefs;
-
   /// \brief The result type for a landingpad.
   Type *LandingPadResultTy;
 
@@ -323,9 +320,6 @@ public:
 
     verifyCompileUnits();
 
-    // Verify type references last.
-    verifyTypeRefs();
-
     return !Broken;
   }
 
@@ -362,27 +356,6 @@ private:
 
   void visitTemplateParams(const MDNode &N, const Metadata &RawParams);
 
-  /// \brief Check for a valid string-based type reference.
-  ///
-  /// Checks if \c MD is a string-based type reference.  If it is, keeps track
-  /// of it (and its user, \c N) for error messages later.
-  bool isValidUUID(const MDNode &N, const Metadata *MD);
-
-  /// \brief Check for a valid type reference.
-  ///
-  /// Checks for subclasses of \a DIType, or \a isValidUUID().
-  bool isTypeRef(const MDNode &N, const Metadata *MD);
-
-  /// \brief Check for a valid scope reference.
-  ///
-  /// Checks for subclasses of \a DIScope, or \a isValidUUID().
-  bool isScopeRef(const MDNode &N, const Metadata *MD);
-
-  /// \brief Check for a valid debug info reference.
-  ///
-  /// Checks for subclasses of \a DINode, or \a isValidUUID().
-  bool isDIRef(const MDNode &N, const Metadata *MD);
-
   // InstVisitor overrides...
   using InstVisitor<Verifier>::visit;
   void visit(Instruction &I);
@@ -467,15 +440,10 @@ private:
   void verifyFrameRecoverIndices();
   void verifySiblingFuncletUnwinds();
 
-  /// @{
+  void verifyBitPieceExpression(const DbgInfoIntrinsic &I);
+
   /// Module-level debug info verification...
-  void verifyTypeRefs();
   void verifyCompileUnits();
-  template <class MapTy>
-  void verifyBitPieceExpression(const DbgInfoIntrinsic &I,
-                                const MapTy &TypeRefs);
-  void visitUnresolvedTypeRef(const MDString *S, const MDNode *N);
-  /// @}
 };
 } // End anonymous namespace
 
@@ -774,31 +742,9 @@ void Verifier::visitMetadataAsValue(cons
     visitValueAsMetadata(*V, F);
 }
 
-bool Verifier::isValidUUID(const MDNode &N, const Metadata *MD) {
-  auto *S = dyn_cast<MDString>(MD);
-  if (!S || S->getString().empty())
-    return false;
-
-  // Keep track of names of types referenced via UUID so we can check that they
-  // actually exist.
-  UnresolvedTypeRefs.insert(std::make_pair(S, &N));
-  return true;
-}
-
-/// \brief Check if a value can be a reference to a type.
-bool Verifier::isTypeRef(const MDNode &N, const Metadata *MD) {
-  return !MD || isValidUUID(N, MD) || isa<DIType>(MD);
-}
-
-/// \brief Check if a value can be a ScopeRef.
-bool Verifier::isScopeRef(const MDNode &N, const Metadata *MD) {
-  return !MD || isValidUUID(N, MD) || isa<DIScope>(MD);
-}
-
-/// \brief Check if a value can be a debug info ref.
-bool Verifier::isDIRef(const MDNode &N, const Metadata *MD) {
-  return !MD || isValidUUID(N, MD) || isa<DINode>(MD);
-}
+static bool isType(const Metadata *MD) { return !MD || isa<DIType>(MD); }
+static bool isScope(const Metadata *MD) { return !MD || isa<DIScope>(MD); }
+static bool isDINode(const Metadata *MD) { return !MD || isa<DINode>(MD); }
 
 template <class Ty>
 bool isValidMetadataArrayImpl(const MDTuple &N, bool AllowNull) {
@@ -872,13 +818,13 @@ void Verifier::visitDIDerivedType(const
              N.getTag() == dwarf::DW_TAG_friend,
          "invalid tag", &N);
   if (N.getTag() == dwarf::DW_TAG_ptr_to_member_type) {
-    Assert(isTypeRef(N, N.getExtraData()), "invalid pointer to member type", &N,
-           N.getExtraData());
+    Assert(isType(N.getRawExtraData()), "invalid pointer to member type", &N,
+           N.getRawExtraData());
   }
 
-  Assert(isScopeRef(N, N.getScope()), "invalid scope", &N, N.getRawScope());
-  Assert(isTypeRef(N, N.getBaseType()), "invalid base type", &N,
-         N.getBaseType());
+  Assert(isScope(N.getRawScope()), "invalid scope", &N, N.getRawScope());
+  Assert(isType(N.getRawBaseType()), "invalid base type", &N,
+         N.getRawBaseType());
 }
 
 static bool hasConflictingReferenceFlags(unsigned Flags) {
@@ -906,13 +852,13 @@ void Verifier::visitDICompositeType(cons
              N.getTag() == dwarf::DW_TAG_class_type,
          "invalid tag", &N);
 
-  Assert(isScopeRef(N, N.getScope()), "invalid scope", &N, N.getRawScope());
-  Assert(isTypeRef(N, N.getBaseType()), "invalid base type", &N,
-         N.getBaseType());
+  Assert(isScope(N.getRawScope()), "invalid scope", &N, N.getRawScope());
+  Assert(isType(N.getRawBaseType()), "invalid base type", &N,
+         N.getRawBaseType());
 
   Assert(!N.getRawElements() || isa<MDTuple>(N.getRawElements()),
          "invalid composite elements", &N, N.getRawElements());
-  Assert(isTypeRef(N, N.getRawVTableHolder()), "invalid vtable holder", &N,
+  Assert(isType(N.getRawVTableHolder()), "invalid vtable holder", &N,
          N.getRawVTableHolder());
   Assert(!hasConflictingReferenceFlags(N.getFlags()), "invalid reference flags",
          &N);
@@ -931,7 +877,7 @@ void Verifier::visitDISubroutineType(con
   if (auto *Types = N.getRawTypeArray()) {
     Assert(isa<MDTuple>(Types), "invalid composite elements", &N, Types);
     for (Metadata *Ty : N.getTypeArray()->operands()) {
-      Assert(isTypeRef(N, Ty), "invalid subroutine type ref", &N, Types, Ty);
+      Assert(isType(Ty), "invalid subroutine type ref", &N, Types, Ty);
     }
   }
   Assert(!hasConflictingReferenceFlags(N.getFlags()), "invalid reference flags",
@@ -998,12 +944,12 @@ void Verifier::visitDICompileUnit(const
 
 void Verifier::visitDISubprogram(const DISubprogram &N) {
   Assert(N.getTag() == dwarf::DW_TAG_subprogram, "invalid tag", &N);
-  Assert(isScopeRef(N, N.getRawScope()), "invalid scope", &N, N.getRawScope());
+  Assert(isScope(N.getRawScope()), "invalid scope", &N, N.getRawScope());
   if (auto *F = N.getRawFile())
     Assert(isa<DIFile>(F), "invalid file", &N, F);
   if (auto *T = N.getRawType())
     Assert(isa<DISubroutineType>(T), "invalid subroutine type", &N, T);
-  Assert(isTypeRef(N, N.getRawContainingType()), "invalid containing type", &N,
+  Assert(isType(N.getRawContainingType()), "invalid containing type", &N,
          N.getRawContainingType());
   if (auto *Params = N.getRawTemplateParams())
     visitTemplateParams(N, *Params);
@@ -1086,7 +1032,7 @@ void Verifier::visitDIModule(const DIMod
 }
 
 void Verifier::visitDITemplateParameter(const DITemplateParameter &N) {
-  Assert(isTypeRef(N, N.getType()), "invalid type ref", &N, N.getType());
+  Assert(isType(N.getRawType()), "invalid type ref", &N, N.getRawType());
 }
 
 void Verifier::visitDITemplateTypeParameter(const DITemplateTypeParameter &N) {
@@ -1109,7 +1055,7 @@ void Verifier::visitDITemplateValueParam
 void Verifier::visitDIVariable(const DIVariable &N) {
   if (auto *S = N.getRawScope())
     Assert(isa<DIScope>(S), "invalid scope", &N, S);
-  Assert(isTypeRef(N, N.getRawType()), "invalid type ref", &N, N.getRawType());
+  Assert(isType(N.getRawType()), "invalid type ref", &N, N.getRawType());
   if (auto *F = N.getRawFile())
     Assert(isa<DIFile>(F), "invalid file", &N, F);
 }
@@ -1148,7 +1094,7 @@ void Verifier::visitDIExpression(const D
 void Verifier::visitDIObjCProperty(const DIObjCProperty &N) {
   Assert(N.getTag() == dwarf::DW_TAG_APPLE_property, "invalid tag", &N);
   if (auto *T = N.getRawType())
-    Assert(isTypeRef(N, T), "invalid type ref", &N, T);
+    Assert(isType(T), "invalid type ref", &N, T);
   if (auto *F = N.getRawFile())
     Assert(isa<DIFile>(F), "invalid file", &N, F);
 }
@@ -1159,8 +1105,8 @@ void Verifier::visitDIImportedEntity(con
          "invalid tag", &N);
   if (auto *S = N.getRawScope())
     Assert(isa<DIScope>(S), "invalid scope for imported entity", &N, S);
-  Assert(isDIRef(N, N.getEntity()), "invalid imported entity", &N,
-         N.getEntity());
+  Assert(isDINode(N.getRawEntity()), "invalid imported entity", &N,
+         N.getRawEntity());
 }
 
 void Verifier::visitComdat(const Comdat &C) {
@@ -3725,6 +3671,9 @@ void Verifier::visitInstruction(Instruct
     visitMDNode(*N);
   }
 
+  if (auto *DII = dyn_cast<DbgInfoIntrinsic>(&I))
+    verifyBitPieceExpression(*DII);
+
   InstsInThisBlock.insert(&I);
 }
 
@@ -4335,8 +4284,7 @@ void Verifier::visitDbgIntrinsic(StringR
          Loc->getScope()->getSubprogram());
 }
 
-template <class MapTy>
-static uint64_t getVariableSize(const DILocalVariable &V, const MapTy &Map) {
+static uint64_t getVariableSize(const DILocalVariable &V) {
   // Be careful of broken types (checked elsewhere).
   const Metadata *RawType = V.getRawType();
   while (RawType) {
@@ -4351,12 +4299,6 @@ static uint64_t getVariableSize(const DI
       continue;
     }
 
-    if (auto *S = dyn_cast<MDString>(RawType)) {
-      // Don't error on missing types (checked elsewhere).
-      RawType = Map.lookup(S);
-      continue;
-    }
-
     // Missing type or size.
     break;
   }
@@ -4365,9 +4307,7 @@ static uint64_t getVariableSize(const DI
   return 0;
 }
 
-template <class MapTy>
-void Verifier::verifyBitPieceExpression(const DbgInfoIntrinsic &I,
-                                        const MapTy &TypeRefs) {
+void Verifier::verifyBitPieceExpression(const DbgInfoIntrinsic &I) {
   DILocalVariable *V;
   DIExpression *E;
   if (auto *DVI = dyn_cast<DbgValueInst>(&I)) {
@@ -4398,7 +4338,7 @@ void Verifier::verifyBitPieceExpression(
 
   // If there's no size, the type is broken, but that should be checked
   // elsewhere.
-  uint64_t VarSize = getVariableSize(*V, TypeRefs);
+  uint64_t VarSize = getVariableSize(*V);
   if (!VarSize)
     return;
 
@@ -4409,12 +4349,6 @@ void Verifier::verifyBitPieceExpression(
   Assert(PieceSize != VarSize, "piece covers entire variable", &I, V, E);
 }
 
-void Verifier::visitUnresolvedTypeRef(const MDString *S, const MDNode *N) {
-  // This is in its own function so we get an error for each bad type ref (not
-  // just the first).
-  Assert(false, "unresolved type ref", S, N);
-}
-
 void Verifier::verifyCompileUnits() {
   auto *CUs = M->getNamedMetadata("llvm.dbg.cu");
   SmallPtrSet<const Metadata *, 2> Listed;
@@ -4427,56 +4361,6 @@ void Verifier::verifyCompileUnits() {
   CUVisited.clear();
 }
 
-void Verifier::verifyTypeRefs() {
-  auto *CUs = M->getNamedMetadata("llvm.dbg.cu");
-  if (!CUs)
-    return;
-
-  // Visit all the compile units again to map the type references.
-  SmallDenseMap<const MDString *, const DIType *, 32> TypeRefs;
-  for (auto *MD : CUs->operands()) {
-    auto *CU = dyn_cast<DICompileUnit>(MD);
-    if (!CU)
-      continue;
-    auto *Array = CU->getRawRetainedTypes();
-    if (!Array || !isa<MDTuple>(Array))
-      continue;
-    for (DIScope *Op : CU->getRetainedTypes())
-      if (auto *T = dyn_cast_or_null<DICompositeType>(Op))
-        if (auto *S = T->getRawIdentifier()) {
-          UnresolvedTypeRefs.erase(S);
-          TypeRefs.insert(std::make_pair(S, T));
-        }
-  }
-
-  // Verify debug info intrinsic bit piece expressions.  This needs a second
-  // pass through the intructions, since we haven't built TypeRefs yet when
-  // verifying functions, and simply queuing the DbgInfoIntrinsics to evaluate
-  // later/now would queue up some that could be later deleted.
-  for (const Function &F : *M)
-    for (const BasicBlock &BB : F)
-      for (const Instruction &I : BB)
-        if (auto *DII = dyn_cast<DbgInfoIntrinsic>(&I))
-          verifyBitPieceExpression(*DII, TypeRefs);
-
-  // Return early if all typerefs were resolved.
-  if (UnresolvedTypeRefs.empty())
-    return;
-
-  // Sort the unresolved references by name so the output is deterministic.
-  typedef std::pair<const MDString *, const MDNode *> TypeRef;
-  SmallVector<TypeRef, 32> Unresolved(UnresolvedTypeRefs.begin(),
-                                      UnresolvedTypeRefs.end());
-  std::sort(Unresolved.begin(), Unresolved.end(),
-            [](const TypeRef &LHS, const TypeRef &RHS) {
-    return LHS.first->getString() < RHS.first->getString();
-  });
-
-  // Visit the unresolved refs (printing out the errors).
-  for (const TypeRef &TR : Unresolved)
-    visitUnresolvedTypeRef(TR.first, TR.second);
-}
-
 //===----------------------------------------------------------------------===//
 //  Implement the public interfaces to this file...
 //===----------------------------------------------------------------------===//

Modified: llvm/trunk/test/Assembler/dicompositetype-members.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/dicompositetype-members.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/dicompositetype-members.ll (original)
+++ llvm/trunk/test/Assembler/dicompositetype-members.ll Sat Apr 23 16:08:00 2016
@@ -14,15 +14,15 @@
 
 ; Define an identified type with fields and functions.
 ; CHECK-NEXT: !3 = !DICompositeType(tag: DW_TAG_structure_type, name: "has-uuid",{{.*}}, identifier: "uuid")
-; CHECK-NEXT: !4 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"uuid", file: !1
-; CHECK-NEXT: !5 = !DIDerivedType(tag: DW_TAG_member, name: "field2", scope: !"uuid", file: !1
-; CHECK-NEXT: !6 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"uuid", file: !1
-; CHECK-NEXT: !7 = !DISubprogram(name: "foo", linkageName: "foo2", scope: !"uuid", file: !1
+; CHECK-NEXT: !4 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !3, file: !1
+; CHECK-NEXT: !5 = !DIDerivedType(tag: DW_TAG_member, name: "field2", scope: !3, file: !1
+; CHECK-NEXT: !6 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !3, file: !1
+; CHECK-NEXT: !7 = !DISubprogram(name: "foo", linkageName: "foo2", scope: !3, file: !1
 !3 = !DICompositeType(tag: DW_TAG_structure_type, name: "has-uuid", file: !1, line: 2, size: 64, align: 32, identifier: "uuid")
-!4 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"uuid", file: !1, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
-!5 = !DIDerivedType(tag: DW_TAG_member, name: "field2", scope: !"uuid", file: !1, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
-!6 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"uuid", file: !1, isDefinition: false)
-!7 = !DISubprogram(name: "foo", linkageName: "foo2", scope: !"uuid", file: !1, isDefinition: false)
+!4 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !3, file: !1, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "field2", scope: !3, file: !1, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
+!6 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !3, file: !1, isDefinition: false)
+!7 = !DISubprogram(name: "foo", linkageName: "foo2", scope: !3, file: !1, isDefinition: false)
 
 ; Define an un-identified type with fields and functions.
 ; CHECK-NEXT: !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "no-uuid", file: !1
@@ -45,8 +45,8 @@
 
 ; Add duplicate fields and members of "has-uuid" in a different file.  These
 ; should be merged.
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"uuid", file: !2, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
-!16 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"uuid", file: !2, isDefinition: false)
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !3, file: !2, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
+!16 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !3, file: !2, isDefinition: false)
 
 ; CHECK-NEXT: !15 = !{!4, !6}
 ; CHECK-NOT: !DIDerivedType

Added: llvm/trunk/test/Bitcode/dityperefs-3.8.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/dityperefs-3.8.ll?rev=267296&view=auto
==============================================================================
--- llvm/trunk/test/Bitcode/dityperefs-3.8.ll (added)
+++ llvm/trunk/test/Bitcode/dityperefs-3.8.ll Sat Apr 23 16:08:00 2016
@@ -0,0 +1,35 @@
+; RUN: llvm-dis < %s.bc | FileCheck %s
+; RUN: verify-uselistorder %s.bc
+
+; Establish a stable order.
+!named = !{!0, !1, !2, !3, !4, !6, !7, !8, !9, !10, !11, !12}
+
+; CHECK:      !0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+; CHECK-NEXT: !1 = !DICompositeType(tag: DW_TAG_structure_type, name: "T1"{{.*}}, identifier: "T1")
+; CHECK-NEXT: !2 = !DICompositeType(tag: DW_TAG_structure_type, name: "T2", scope: !1{{.*}}, baseType: !1, vtableHolder: !1, identifier: "T2")
+; CHECK-NEXT: !3 = !DIDerivedType(tag: DW_TAG_member, name: "M1", scope: !1{{.*}}, baseType: !2)
+; CHECK-NEXT: !4 = !DISubroutineType(types: !5)
+; CHECK-NEXT: !5 = !{!1, !2}
+; CHECK-NEXT: !6 = !DISubprogram(scope: !1,{{.*}} containingType: !1{{[,)]}}
+; CHECK-NEXT: !7 = !DILocalVariable(name: "V1", scope: !6, type: !2)
+; CHECK-NEXT: !8 = !DIObjCProperty(name: "P1", type: !1)
+; CHECK-NEXT: !9 = !DITemplateTypeParameter(type: !1)
+; CHECK-NEXT: !10 = !DIGlobalVariable(name: "G",{{.*}} type: !1,{{.*}} variable: i32* @G1)
+; CHECK-NEXT: !11 = !DITemplateValueParameter(type: !1, value: i32* @G1)
+; CHECK-NEXT: !12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !1)
+
+!0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+!1 = !DICompositeType(tag: DW_TAG_structure_type, name: "T1", file: !0, identifier: "T1")
+!2 = !DICompositeType(tag: DW_TAG_structure_type, name: "T2", file: !0, scope: !"T1", baseType: !"T1", vtableHolder: !"T1", identifier: "T2")
+!3 = !DIDerivedType(tag: DW_TAG_member, name: "M1", file: !0, scope: !"T1", baseType: !"T2")
+!4 = !DISubroutineType(types: !5)
+!5 = !{!"T1", !"T2"}
+!6 = !DISubprogram(scope: !"T1", isDefinition: false, containingType: !"T1")
+!7 = !DILocalVariable(name: "V1", scope: !6, type: !"T2")
+!8 = !DIObjCProperty(name: "P1", type: !"T1")
+!9 = !DITemplateTypeParameter(type: !"T1")
+!10 = !DIGlobalVariable(name: "G", type: !"T1", isDefinition: false, variable: i32* @G1)
+!11 = !DITemplateValueParameter(type: !"T1", value: i32* @G1)
+!12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !"T1")
+
+ at G1 = global i32 0

Added: llvm/trunk/test/Bitcode/dityperefs-3.8.ll.bc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/dityperefs-3.8.ll.bc?rev=267296&view=auto
==============================================================================
Binary files llvm/trunk/test/Bitcode/dityperefs-3.8.ll.bc (added) and llvm/trunk/test/Bitcode/dityperefs-3.8.ll.bc Sat Apr 23 16:08:00 2016 differ

Modified: llvm/trunk/test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll (original)
+++ llvm/trunk/test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll Sat Apr 23 16:08:00 2016
@@ -130,23 +130,23 @@ attributes #4 = { nounwind }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "AAA3", file: !1, line: 4, size: 32, align: 8, elements: !5, identifier: "_ZTS4AAA3")
 !5 = !{!6, !11, !17, !18}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "text", scope: !"_ZTS4AAA3", file: !1, line: 8, baseType: !7, size: 32, align: 8)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "text", scope: !4, file: !1, line: 8, baseType: !7, size: 32, align: 8)
 !7 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 32, align: 8, elements: !9)
 !8 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
 !9 = !{!10}
 !10 = !DISubrange(count: 4)
-!11 = !DISubprogram(name: "AAA3", scope: !"_ZTS4AAA3", file: !1, line: 5, type: !12, isLocal: false, isDefinition: false, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true)
+!11 = !DISubprogram(name: "AAA3", scope: !4, file: !1, line: 5, type: !12, isLocal: false, isDefinition: false, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true)
 !12 = !DISubroutineType(types: !13)
 !13 = !{null, !14, !15}
-!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS4AAA3", size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
 !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !16, size: 64, align: 64)
 !16 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !8)
-!17 = !DISubprogram(name: "operator=", linkageName: "_ZN4AAA3aSEPKc", scope: !"_ZTS4AAA3", file: !1, line: 6, type: !12, isLocal: false, isDefinition: false, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true)
-!18 = !DISubprogram(name: "operator const char *", linkageName: "_ZNK4AAA3cvPKcEv", scope: !"_ZTS4AAA3", file: !1, line: 7, type: !19, isLocal: false, isDefinition: false, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: true)
+!17 = !DISubprogram(name: "operator=", linkageName: "_ZN4AAA3aSEPKc", scope: !4, file: !1, line: 6, type: !12, isLocal: false, isDefinition: false, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true)
+!18 = !DISubprogram(name: "operator const char *", linkageName: "_ZNK4AAA3cvPKcEv", scope: !4, file: !1, line: 7, type: !19, isLocal: false, isDefinition: false, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: true)
 !19 = !DISubroutineType(types: !20)
 !20 = !{!15, !21}
 !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !22, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
-!22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS4AAA3")
+!22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !4)
 !24 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barii", scope: !1, file: !1, line: 11, type: !25, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !28)
 !25 = !DISubroutineType(types: !26)
 !26 = !{null, !27, !27}
@@ -155,14 +155,14 @@ attributes #4 = { nounwind }
 !29 = !DILocalVariable(name: "param1", arg: 1, scope: !24, file: !1, line: 11, type: !27)
 !30 = !DILocalVariable(name: "param2", arg: 2, scope: !24, file: !1, line: 11, type: !27)
 !31 = !DILocalVariable(name: "temp", scope: !24, file: !1, line: 12, type: !15)
-!32 = !DILocalVariable(name: "var1", scope: !24, file: !1, line: 17, type: !"_ZTS4AAA3")
-!33 = !DILocalVariable(name: "var2", scope: !24, file: !1, line: 18, type: !"_ZTS4AAA3")
-!34 = distinct !DISubprogram(name: "AAA3", linkageName: "_ZN4AAA3C2EPKc", scope: !"_ZTS4AAA3", file: !1, line: 5, type: !12, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !11, variables: !35)
+!32 = !DILocalVariable(name: "var1", scope: !24, file: !1, line: 17, type: !4)
+!33 = !DILocalVariable(name: "var2", scope: !24, file: !1, line: 18, type: !4)
+!34 = distinct !DISubprogram(name: "AAA3", linkageName: "_ZN4AAA3C2EPKc", scope: !4, file: !1, line: 5, type: !12, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !11, variables: !35)
 !35 = !{!36, !38}
 !36 = !DILocalVariable(name: "this", arg: 1, scope: !34, type: !37, flags: DIFlagArtificial | DIFlagObjectPointer)
-!37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS4AAA3", size: 64, align: 64)
+!37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
 !38 = !DILocalVariable(name: "value", arg: 2, scope: !34, file: !1, line: 5, type: !15)
-!39 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN4AAA3aSEPKc", scope: !"_ZTS4AAA3", file: !1, line: 6, type: !12, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !17, variables: !40)
+!39 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN4AAA3aSEPKc", scope: !4, file: !1, line: 6, type: !12, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !17, variables: !40)
 !40 = !{!41, !42}
 !41 = !DILocalVariable(name: "this", arg: 1, scope: !39, type: !37, flags: DIFlagArtificial | DIFlagObjectPointer)
 !42 = !DILocalVariable(name: "value", arg: 2, scope: !39, file: !1, line: 6, type: !15)

Modified: llvm/trunk/test/CodeGen/X86/misched-code-difference-with-debug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/misched-code-difference-with-debug.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/misched-code-difference-with-debug.ll (original)
+++ llvm/trunk/test/CodeGen/X86/misched-code-difference-with-debug.ll Sat Apr 23 16:08:00 2016
@@ -68,18 +68,18 @@ declare void @llvm.dbg.value(metadata, i
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "C", line: 2, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1C")
 !5 = !{!6}
-!6 = !DISubprogram(name: "test", file: !1, scope: !"_ZTS1C", type: !7, isDefinition: false)
+!6 = !DISubprogram(name: "test", file: !1, scope: !4, type: !7, isDefinition: false)
 !7 = !DISubroutineType(types: !8)
 !8 = !{!9, !10, !11, !11, !11, null}
 !9 = !DIBasicType(encoding: DW_ATE_signed, size: 32, align: 32, name: "int")
-!10 = !DIDerivedType(baseType: !"_ZTS1C", tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial)
+!10 = !DIDerivedType(baseType: !4, tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial)
 !11 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
 !13 = distinct !DISubprogram(name: "test_with_debug", linkageName: "test_with_debug", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !1, scope: !14, type: !15, variables: !17)
 !14 = !DIFile(filename: "test.cpp", directory: "")
 !15 = !DISubroutineType(types: !16)
 !16 = !{null}
 !17 = !{!18, !19}
-!18 = !DILocalVariable(name: "c", line: 7, scope: !13, file: !14, type: !"_ZTS1C")
+!18 = !DILocalVariable(name: "c", line: 7, scope: !13, file: !14, type: !4)
 !19 = !DILocalVariable(name: "lc", line: 8, scope: !13, file: !14, type: !11)
 !20 = !{!21}
 !21 = !DIGlobalVariable(name: "argc", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !11, variable: i8* @argc)

Modified: llvm/trunk/test/DebugInfo/AArch64/cfi-eof-prologue.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/AArch64/cfi-eof-prologue.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/AArch64/cfi-eof-prologue.ll (original)
+++ llvm/trunk/test/DebugInfo/AArch64/cfi-eof-prologue.ll Sat Apr 23 16:08:00 2016
@@ -65,16 +65,16 @@ attributes #3 = { nounwind }
 !1 = !DIFile(filename: "<stdin>", directory: "")
 !2 = !{}
 !3 = !{!4, !13}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !"_ZTS1A", identifier: "_ZTS1B")
+!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !13, identifier: "_ZTS1B")
 !5 = !DIFile(filename: "test1.cpp", directory: "")
 !6 = !{!7, !8, !12}
-!7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !"_ZTS1B", baseType: !"_ZTS1A")
-!8 = !DISubprogram(name: "B", line: 6, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !"_ZTS1B", type: !9)
+!7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !4, baseType: !13)
+!8 = !DISubprogram(name: "B", line: 6, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !4, type: !9)
 !9 = !DISubroutineType(types: !10)
 !10 = !{null, !11}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B")
-!12 = !DISubprogram(name: "~B", line: 7, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !"_ZTS1B", type: !9, containingType: !"_ZTS1B")
-!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 64, align: 64, file: !5, elements: !14, vtableHolder: !"_ZTS1A", identifier: "_ZTS1A")
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!12 = !DISubprogram(name: "~B", line: 7, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !4, type: !9, containingType: !4)
+!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 64, align: 64, file: !5, elements: !14, vtableHolder: !13, identifier: "_ZTS1A")
 !14 = !{!15, !22, !26}
 !15 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 64, flags: DIFlagArtificial, file: !5, scope: !16, baseType: !17)
 !16 = !DIFile(filename: "test1.cpp", directory: "")
@@ -83,16 +83,16 @@ attributes #3 = { nounwind }
 !19 = !DISubroutineType(types: !20)
 !20 = !{!21}
 !21 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!22 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !23)
+!22 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !13, type: !23)
 !23 = !DISubroutineType(types: !24)
 !24 = !{null, !25}
-!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
-!26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !"_ZTS1A", type: !23, containingType: !"_ZTS1A")
-!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !29)
+!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !13)
+!26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !13, type: !23, containingType: !13)
+!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !4, type: !9, declaration: !8, variables: !29)
 !29 = !{!30}
 !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
-!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1B")
-!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !33)
+!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
+!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !4, type: !9, declaration: !8, variables: !33)
 !33 = !{!34}
 !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !31)
 !35 = !{i32 2, !"Dwarf Version", i32 4}

Modified: llvm/trunk/test/DebugInfo/AArch64/frameindices.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/AArch64/frameindices.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/AArch64/frameindices.ll (original)
+++ llvm/trunk/test/DebugInfo/AArch64/frameindices.ll Sat Apr 23 16:08:00 2016
@@ -167,38 +167,38 @@ attributes #5 = { builtin }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 2, size: 192, align: 64, file: !5, elements: !6, identifier: "_ZTS1A")
 !5 = !DIFile(filename: "test.cpp", directory: "")
 !6 = !{!7, !9, !11}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "x4", line: 3, size: 8, align: 8, file: !5, scope: !"_ZTS1A", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "x4", line: 3, size: 8, align: 8, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "x5", line: 4, size: 64, align: 64, offset: 64, file: !5, scope: !"_ZTS1A", baseType: !10)
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "x5", line: 4, size: 64, align: 64, offset: 64, file: !5, scope: !4, baseType: !10)
 !10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: null)
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "x6", line: 5, size: 8, align: 8, offset: 128, file: !5, scope: !"_ZTS1A", baseType: !8)
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "x6", line: 5, size: 8, align: 8, offset: 128, file: !5, scope: !4, baseType: !8)
 !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !13)
 !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !14 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 8, size: 8, align: 8, file: !5, elements: !15, identifier: "_ZTS1B")
 !15 = !{!16, !21}
-!16 = !DISubprogram(name: "B", line: 9, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !17)
+!16 = !DISubprogram(name: "B", line: 9, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !5, scope: !14, type: !17)
 !17 = !DISubroutineType(types: !18)
 !18 = !{null, !19, !20}
-!19 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B")
+!19 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !14)
 !20 = !DIBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed)
-!21 = !DISubprogram(name: "~B", line: 10, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !5, scope: !"_ZTS1B", type: !22)
+!21 = !DISubprogram(name: "~B", line: 10, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !5, scope: !14, type: !22)
 !22 = !DISubroutineType(types: !23)
 !23 = !{null, !19}
 !25 = distinct !DISubprogram(name: "f13", linkageName: "_Z3f131A", line: 13, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 13, file: !5, scope: !26, type: !27, variables: !29)
 !26 = !DIFile(filename: "test.cpp", directory: "")
 !27 = !DISubroutineType(types: !28)
-!28 = !{null, !"_ZTS1A"}
+!28 = !{null, !4}
 !29 = !{!30}
-!30 = !DILocalVariable(name: "p1", line: 13, arg: 1, scope: !25, file: !26, type: !"_ZTS1A")
+!30 = !DILocalVariable(name: "p1", line: 13, arg: 1, scope: !25, file: !26, type: !4)
 !31 = distinct !DISubprogram(name: "f11", linkageName: "_Z3f111A", line: 17, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 17, file: !5, scope: !26, type: !27, variables: !32)
 !32 = !{!33}
-!33 = !DILocalVariable(name: "p1", line: 17, arg: 1, scope: !31, file: !26, type: !"_ZTS1A")
+!33 = !DILocalVariable(name: "p1", line: 17, arg: 1, scope: !31, file: !26, type: !4)
 !34 = distinct !DISubprogram(name: "f16", linkageName: "_Z3f16v", line: 18, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 18, file: !5, scope: !26, type: !35, variables: !37)
 !35 = !DISubroutineType(types: !36)
 !36 = !{null}
 !37 = !{!38, !39}
-!38 = !DILocalVariable(name: "c", line: 19, scope: !34, file: !26, type: !"_ZTS1A")
-!39 = !DILocalVariable(name: "d", line: 20, scope: !34, file: !26, type: !"_ZTS1B")
+!38 = !DILocalVariable(name: "c", line: 19, scope: !34, file: !26, type: !4)
+!39 = !DILocalVariable(name: "d", line: 20, scope: !34, file: !26, type: !14)
 !40 = !{!41, !42}
 !41 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !26, type: !20, variable: i64* @a)
 !42 = !DIGlobalVariable(name: "b", line: 7, isLocal: false, isDefinition: true, scope: null, file: !26, type: !12, variable: i32** @b)
@@ -233,7 +233,7 @@ attributes #5 = { builtin }
 !71 = !DILocation(line: 15, column: 3, scope: !25, inlinedAt: !66)
 !72 = !DILocation(line: 16, column: 1, scope: !25, inlinedAt: !66)
 !73 = !DILocation(line: 17, column: 27, scope: !31)
-!74 = !DILocalVariable(name: "p1", line: 17, arg: 1, scope: !31, file: !26, type: !"_ZTS1A")
+!74 = !DILocalVariable(name: "p1", line: 17, arg: 1, scope: !31, file: !26, type: !4)
 !75 = distinct !DILocation(line: 22, column: 3, scope: !34)
 !76 = !DIExpression(DW_OP_bit_piece, 8, 120)
 !77 = !DILocation(line: 17, column: 12, scope: !31, inlinedAt: !75)

Modified: llvm/trunk/test/DebugInfo/ARM/cfi-eof-prologue.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/ARM/cfi-eof-prologue.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/ARM/cfi-eof-prologue.ll (original)
+++ llvm/trunk/test/DebugInfo/ARM/cfi-eof-prologue.ll Sat Apr 23 16:08:00 2016
@@ -66,16 +66,16 @@ attributes #3 = { nounwind }
 !1 = !DIFile(filename: "<stdin>", directory: "")
 !2 = !{}
 !3 = !{!4, !13}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 32, align: 32, file: !5, elements: !6, vtableHolder: !"_ZTS1A", identifier: "_ZTS1B")
+!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 32, align: 32, file: !5, elements: !6, vtableHolder: !13, identifier: "_ZTS1B")
 !5 = !DIFile(filename: "test1.cpp", directory: "")
 !6 = !{!7, !8, !12}
-!7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !"_ZTS1B", baseType: !"_ZTS1A")
-!8 = !DISubprogram(name: "B", line: 6, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !"_ZTS1B", type: !9)
+!7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !4, baseType: !13)
+!8 = !DISubprogram(name: "B", line: 6, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !4, type: !9)
 !9 = !DISubroutineType(types: !10)
 !10 = !{null, !11}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B")
-!12 = !DISubprogram(name: "~B", line: 7, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !"_ZTS1B", type: !9, containingType: !"_ZTS1B")
-!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 32, align: 32, file: !5, elements: !14, vtableHolder: !"_ZTS1A", identifier: "_ZTS1A")
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!12 = !DISubprogram(name: "~B", line: 7, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !4, type: !9, containingType: !4)
+!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 32, align: 32, file: !5, elements: !14, vtableHolder: !13, identifier: "_ZTS1A")
 !14 = !{!15, !22, !26}
 !15 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 32, flags: DIFlagArtificial, file: !5, scope: !16, baseType: !17)
 !16 = !DIFile(filename: "test1.cpp", directory: "")
@@ -84,16 +84,16 @@ attributes #3 = { nounwind }
 !19 = !DISubroutineType(types: !20)
 !20 = !{!21}
 !21 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!22 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !23)
+!22 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !13, type: !23)
 !23 = !DISubroutineType(types: !24)
 !24 = !{null, !25}
-!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
-!26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !"_ZTS1A", type: !23, containingType: !"_ZTS1A")
-!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !29)
+!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !13)
+!26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !13, type: !23, containingType: !13)
+!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !4, type: !9, declaration: !8, variables: !29)
 !29 = !{!30}
 !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
-!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"_ZTS1B")
-!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !33)
+!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !4)
+!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !4, type: !9, declaration: !8, variables: !33)
 !33 = !{!34}
 !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !31)
 !35 = !{i32 2, !"Dwarf Version", i32 4}

Modified: llvm/trunk/test/DebugInfo/Generic/PR20038.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/PR20038.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/PR20038.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/PR20038.ll Sat Apr 23 16:08:00 2016
@@ -130,16 +130,16 @@ attributes #2 = { nounwind readnone }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 1, size: 8, align: 8, file: !5, elements: !6, identifier: "_ZTS1C")
 !5 = !DIFile(filename: "PR20038.cpp", directory: "/tmp/dbginfo")
 !6 = !{!7}
-!7 = !DISubprogram(name: "~C", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !5, scope: !"_ZTS1C", type: !8)
+!7 = !DISubprogram(name: "~C", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !5, scope: !4, type: !8)
 !8 = !DISubroutineType(types: !9)
 !9 = !{null, !10}
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C")
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !12 = distinct !DISubprogram(name: "fun4", linkageName: "_Z4fun4v", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !5, scope: !13, type: !14, variables: !2)
 !13 = !DIFile(filename: "PR20038.cpp", directory: "/tmp/dbginfo")
 !14 = !DISubroutineType(types: !15)
 !15 = !{null}
-!16 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, declaration: !7, variables: !2)
-!17 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, declaration: !7, variables: !2)
+!16 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !5, scope: !4, type: !8, declaration: !7, variables: !2)
+!17 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !5, scope: !4, type: !8, declaration: !7, variables: !2)
 !18 = !{i32 2, !"Dwarf Version", i32 4}
 !19 = !{i32 2, !"Debug Info Version", i32 3}
 !20 = !{!"clang version 3.5.0 "}
@@ -152,7 +152,7 @@ attributes #2 = { nounwind readnone }
 !27 = !DILocation(line: 5, scope: !28)
 !28 = distinct !DILexicalBlock(line: 5, column: 0, file: !5, scope: !12)
 !29 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !30)
-!30 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C")
+!30 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !31 = !DILocation(line: 0, scope: !17, inlinedAt: !22)
 !32 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30)
 !33 = !DILocation(line: 0, scope: !16, inlinedAt: !21)

Modified: llvm/trunk/test/DebugInfo/Generic/dead-argument-order.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/dead-argument-order.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/dead-argument-order.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/dead-argument-order.ll Sat Apr 23 16:08:00 2016
@@ -63,14 +63,14 @@ attributes #1 = { nounwind readnone }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", line: 1, size: 32, align: 32, file: !1, elements: !5, identifier: "_ZTS1S")
 !5 = !{!6}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 1, size: 32, align: 32, file: !1, scope: !"_ZTS1S", baseType: !7)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 1, size: 32, align: 32, file: !1, scope: !4, baseType: !7)
 !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !9 = distinct !DISubprogram(name: "function", linkageName: "_Z8function1Si", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !10, type: !11, variables: !13)
 !10 = !DIFile(filename: "dead-argument-order.cpp", directory: "/tmp/dbginfo")
 !11 = !DISubroutineType(types: !12)
 !12 = !{!7, !4, !7}
 !13 = !{!14, !15}
-!14 = !DILocalVariable(name: "s", line: 2, arg: 1, scope: !9, file: !10, type: !"_ZTS1S")
+!14 = !DILocalVariable(name: "s", line: 2, arg: 1, scope: !9, file: !10, type: !4)
 !15 = !DILocalVariable(name: "i", line: 2, arg: 2, scope: !9, file: !10, type: !7)
 !16 = !{i32 2, !"Dwarf Version", i32 4}
 !17 = !{i32 2, !"Debug Info Version", i32 3}

Modified: llvm/trunk/test/DebugInfo/Generic/debug-info-qualifiers.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/debug-info-qualifiers.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/debug-info-qualifiers.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/debug-info-qualifiers.ll Sat Apr 23 16:08:00 2016
@@ -68,12 +68,12 @@ attributes #1 = { nounwind readnone }
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 8, align: 8, file: !5, elements: !6, identifier: "_ZTS1A")
 !5 = !DIFile(filename: "debug-info-qualifiers.cpp", directory: "")
 !6 = !{!7, !13}
-!7 = !DISubprogram(name: "l", linkageName: "_ZNKR1A1lEv", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped | DIFlagLValueReference, isOptimized: false, scopeLine: 5, file: !5, scope: !"_ZTS1A", type: !8)
+!7 = !DISubprogram(name: "l", linkageName: "_ZNKR1A1lEv", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped | DIFlagLValueReference, isOptimized: false, scopeLine: 5, file: !5, scope: !4, type: !8)
 !8 = !DISubroutineType(flags: DIFlagLValueReference, types: !9)
 !9 = !{null, !10}
 !10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !11)
-!11 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS1A")
-!13 = !DISubprogram(name: "r", linkageName: "_ZNKO1A1rEv", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagObjectPointer | DIFlagRValueReference, isOptimized: false, scopeLine: 7, file: !5, scope: !"_ZTS1A", type: !14)
+!11 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !4)
+!13 = !DISubprogram(name: "r", linkageName: "_ZNKO1A1rEv", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagObjectPointer | DIFlagRValueReference, isOptimized: false, scopeLine: 7, file: !5, scope: !4, type: !14)
 !14 = !DISubroutineType(flags: DIFlagRValueReference, types: !9)
 !17 = distinct !DISubprogram(name: "g", linkageName: "_Z1gv", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !5, scope: !18, type: !19, variables: !2)
 !18 = !DIFile(filename: "debug-info-qualifiers.cpp", directory: "")
@@ -85,13 +85,13 @@ attributes #1 = { nounwind readnone }
 !24 = !DILocalVariable(name: "a", line: 11, scope: !17, file: !18, type: !4)
 !25 = !DILocation(line: 11, scope: !17)
 !26 = !DILocalVariable(name: "pl", line: 16, scope: !17, file: !18, type: !27)
-!27 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !28, extraData: !"_ZTS1A")
+!27 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !28, extraData: !4)
 !28 = !DISubroutineType(flags: DIFlagLValueReference, types: !29)
 !29 = !{null, !30}
-!30 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
+!30 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !31 = !DILocation(line: 16, scope: !17)
 !32 = !DILocalVariable(name: "pr", line: 21, scope: !17, file: !18, type: !33)
-!33 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !34, extraData: !"_ZTS1A")
+!33 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !34, extraData: !4)
 !34 = !DISubroutineType(flags: DIFlagRValueReference, types: !29)
 !35 = !DILocation(line: 21, scope: !17)
 !36 = !DILocation(line: 22, scope: !17)

Modified: llvm/trunk/test/DebugInfo/Generic/def-line.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/def-line.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/def-line.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/def-line.ll Sat Apr 23 16:08:00 2016
@@ -74,15 +74,15 @@ attributes #1 = { nounwind uwtable "disa
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !1, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS3foo")
 !5 = !{!6, !9, !10}
-!6 = !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", scope: !"_ZTS3foo", file: !1, line: 2, type: !7, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
+!6 = !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", scope: !4, file: !1, line: 2, type: !7, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
 !7 = !DISubroutineType(types: !8)
 !8 = !{null}
-!9 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !"_ZTS3foo", file: !1, line: 4, type: !7, isLocal: false, isDefinition: false, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false)
-!10 = !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !"_ZTS3foo", file: !1, line: 5, type: !7, isLocal: false, isDefinition: false, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false)
-!12 = distinct !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !"_ZTS3foo", file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !9, variables: !2)
-!13 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !"_ZTS3foo", file: !14, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !10, variables: !2)
+!9 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !4, file: !1, line: 4, type: !7, isLocal: false, isDefinition: false, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false)
+!10 = !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !4, file: !1, line: 5, type: !7, isLocal: false, isDefinition: false, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false)
+!12 = distinct !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !4, file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !9, variables: !2)
+!13 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !4, file: !14, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !10, variables: !2)
 !14 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
-!15 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", scope: !"_ZTS3foo", file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !6, variables: !2)
+!15 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", scope: !4, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !6, variables: !2)
 !16 = !{i32 2, !"Dwarf Version", i32 4}
 !17 = !{i32 2, !"Debug Info Version", i32 3}
 !18 = !{!"clang version 3.8.0 (trunk 249440) (llvm/trunk 249465)"}

Modified: llvm/trunk/test/DebugInfo/Generic/enum-types.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/enum-types.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/enum-types.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/enum-types.ll Sat Apr 23 16:08:00 2016
@@ -57,7 +57,7 @@ attributes #1 = { nounwind readnone }
 !7 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topA2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !8, type: !9, variables: !11)
 !8 = !DIFile(filename: "a.cpp", directory: "")
 !9 = !DISubroutineType(types: !10)
-!10 = !{null, !"_ZTS2EA"}
+!10 = !{null, !3}
 !11 = !{}
 !12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214133) (llvm/trunk 214102:214132)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !14, retainedTypes: !14, globals: !11, imports: !11)
 !13 = !DIFile(filename: "b.cpp", directory: "")
@@ -68,9 +68,9 @@ attributes #1 = { nounwind readnone }
 !19 = !{i32 2, !"Dwarf Version", i32 2}
 !20 = !{i32 2, !"Debug Info Version", i32 3}
 !21 = !{!"clang version 3.5.0 (trunk 214102:214133) (llvm/trunk 214102:214132)"}
-!22 = !DILocalVariable(name: "sa", line: 5, arg: 1, scope: !7, file: !8, type: !"_ZTS2EA")
+!22 = !DILocalVariable(name: "sa", line: 5, arg: 1, scope: !7, file: !8, type: !3)
 !23 = !DILocation(line: 5, column: 14, scope: !7)
 !24 = !DILocation(line: 6, column: 1, scope: !7)
-!25 = !DILocalVariable(name: "sa", line: 5, arg: 1, scope: !17, file: !18, type: !"_ZTS2EA")
+!25 = !DILocalVariable(name: "sa", line: 5, arg: 1, scope: !17, file: !18, type: !3)
 !26 = !DILocation(line: 5, column: 14, scope: !17)
 !27 = !DILocation(line: 6, column: 1, scope: !17)

Modified: llvm/trunk/test/DebugInfo/Generic/incorrect-variable-debugloc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/incorrect-variable-debugloc.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/incorrect-variable-debugloc.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/incorrect-variable-debugloc.ll Sat Apr 23 16:08:00 2016
@@ -343,41 +343,41 @@ attributes #3 = { nounwind readnone }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 10, size: 64, align: 32, file: !5, elements: !6, identifier: "_ZTS1C")
 !5 = !DIFile(filename: "incorrect-variable-debug-loc.cpp", directory: "/tmp/dbginfo")
 !6 = !{!7, !9, !10}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "j", line: 12, size: 32, align: 32, file: !5, scope: !"_ZTS1C", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "j", line: 12, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 13, size: 32, align: 32, offset: 32, file: !5, scope: !"_ZTS1C", baseType: !"_ZTS1B")
-!10 = !DISubprogram(name: "m_fn3", linkageName: "_ZN1C5m_fn3Ev", line: 11, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !5, scope: !"_ZTS1C", type: !11)
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 13, size: 32, align: 32, offset: 32, file: !5, scope: !4, baseType: !14)
+!10 = !DISubprogram(name: "m_fn3", linkageName: "_ZN1C5m_fn3Ev", line: 11, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !5, scope: !4, type: !11)
 !11 = !DISubroutineType(types: !12)
 !12 = !{null, !13}
-!13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C")
+!13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !14 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 5, size: 32, align: 32, file: !5, elements: !15, identifier: "_ZTS1B")
 !15 = !{!16, !17}
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 7, size: 32, align: 32, file: !5, scope: !"_ZTS1B", baseType: !8)
-!17 = !DISubprogram(name: "m_fn2", linkageName: "_ZN1B5m_fn2Ev", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !"_ZTS1B", type: !18)
+!16 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 7, size: 32, align: 32, file: !5, scope: !14, baseType: !8)
+!17 = !DISubprogram(name: "m_fn2", linkageName: "_ZN1B5m_fn2Ev", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !14, type: !18)
 !18 = !DISubroutineType(types: !19)
 !19 = !{null, !20}
-!20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B")
+!20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !14)
 !22 = distinct !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 16, file: !5, scope: !23, type: !24, variables: !26)
 !23 = !DIFile(filename: "incorrect-variable-debug-loc.cpp", directory: "/tmp/dbginfo")
 !24 = !DISubroutineType(types: !25)
 !25 = !{!8}
 !26 = !{!27}
-!27 = !DILocalVariable(name: "A", line: 17, scope: !22, file: !23, type: !"_ZTS1C")
-!28 = distinct !DISubprogram(name: "m_fn3", linkageName: "_ZN1C5m_fn3Ev", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 21, file: !5, scope: !"_ZTS1C", type: !11, declaration: !10, variables: !29)
+!27 = !DILocalVariable(name: "A", line: 17, scope: !22, file: !23, type: !4)
+!28 = distinct !DISubprogram(name: "m_fn3", linkageName: "_ZN1C5m_fn3Ev", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 21, file: !5, scope: !4, type: !11, declaration: !10, variables: !29)
 !29 = !{!30}
 !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
-!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C")
-!32 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1B5m_fn2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !5, scope: !"_ZTS1B", type: !18, declaration: !17, variables: !33)
+!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
+!32 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1B5m_fn2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !5, scope: !14, type: !18, declaration: !17, variables: !33)
 !33 = !{!34}
 !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !35)
-!35 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1B")
+!35 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !14)
 !36 = !{i32 2, !"Dwarf Version", i32 4}
 !37 = !{i32 2, !"Debug Info Version", i32 3}
 !38 = !{!"clang version 3.5.0 "}
 !39 = !DILocation(line: 6, scope: !32, inlinedAt: !40)
 !40 = !DILocation(line: 18, scope: !22)
 !41 = !{!42, !43, i64 0}
-!42 = !{!"_ZTS1B", !43, i64 0}
+!42 = !{!14, !43, i64 0}
 !43 = !{!"int", !44, i64 0}
 !44 = !{!"omnipotent char", !45, i64 0}
 !45 = !{!"Simple C/C++ TBAA"}

Modified: llvm/trunk/test/DebugInfo/Generic/member-order.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/member-order.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/member-order.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/member-order.ll Sat Apr 23 16:08:00 2016
@@ -52,14 +52,14 @@ attributes #1 = { nounwind readnone }
 !6 = !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !4, type: !7)
 !7 = !DISubroutineType(types: !8)
 !8 = !{null, !9}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS3foo")
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !10 = !{i32 786468}
 !11 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !4, type: !7)
 !12 = !{i32 786468}
 !14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: null, type: !7, declaration: !6, variables: !2)
 !15 = !{i32 2, !"Dwarf Version", i32 4}
 !16 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !14, type: !17)
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3foo")
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !18 = !DILocation(line: 0, scope: !14)
 !19 = !DILocation(line: 7, scope: !14)
 !20 = !{i32 1, !"Debug Info Version", i32 3}

Modified: llvm/trunk/test/DebugInfo/Generic/namespace.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/namespace.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/namespace.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/namespace.ll Sat Apr 23 16:08:00 2016
@@ -327,12 +327,12 @@ attributes #1 = { nounwind readnone }
 !38 = distinct !DILexicalBlock(line: 22, column: 10, file: !5, scope: !39)
 !39 = distinct !DILexicalBlock(line: 22, column: 7, file: !5, scope: !21)
 !40 = !DIImportedEntity(tag: DW_TAG_imported_module, line: 26, scope: !21, entity: !7)
-!41 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 27, scope: !21, entity: !"_ZTSN1A1B3fooE")
-!42 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 28, scope: !21, entity: !"_ZTSN1A1B3barE")
+!41 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 27, scope: !21, entity: !4)
+!42 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 28, scope: !21, entity: !8)
 !43 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 29, scope: !21, entity: !14)
 !44 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 30, scope: !21, entity: !31)
 !45 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 31, scope: !21, entity: !46)
-!46 = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", line: 7, file: !5, scope: !6, baseType: !"_ZTSN1A1B3barE")
+!46 = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", line: 7, file: !5, scope: !6, baseType: !8)
 !47 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 32, name: "X", scope: !21, entity: !7)
 !48 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 33, name: "Y", scope: !21, entity: !47)
 !49 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 34, scope: !21, entity: !50)

Modified: llvm/trunk/test/DebugInfo/Generic/recursive_inlining.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/recursive_inlining.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/recursive_inlining.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/recursive_inlining.ll Sat Apr 23 16:08:00 2016
@@ -206,12 +206,12 @@ attributes #3 = { nounwind }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 5, size: 32, align: 32, file: !5, elements: !6, identifier: "_ZTS1C")
 !5 = !DIFile(filename: "recursive_inlining.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce")
 !6 = !{!7, !9}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, size: 32, align: 32, file: !5, scope: !"_ZTS1C", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !"_ZTS1C", type: !10)
+!9 = !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !4, type: !10)
 !10 = !DISubroutineType(types: !11)
 !11 = !{null, !12}
-!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C")
+!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !14 = distinct !DISubprogram(name: "fn6", linkageName: "_Z3fn6v", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 15, file: !5, scope: !15, type: !16, variables: !2)
 !15 = !DIFile(filename: "recursive_inlining.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce")
 !16 = !DISubroutineType(types: !17)
@@ -220,10 +220,10 @@ attributes #3 = { nounwind }
 !19 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 21, file: !5, scope: !15, type: !16, variables: !2)
 !20 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 22, file: !5, scope: !15, type: !16, variables: !2)
 !21 = distinct !DISubprogram(name: "fn7", linkageName: "_Z3fn7v", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !5, scope: !15, type: !16, variables: !2)
-!22 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 7, file: !5, scope: !"_ZTS1C", type: !10, declaration: !9, variables: !23)
+!22 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 7, file: !5, scope: !4, type: !10, declaration: !9, variables: !23)
 !23 = !{!24}
 !24 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25)
-!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C")
+!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !26 = !{!27}
 !27 = !DIGlobalVariable(name: "x", line: 13, isLocal: false, isDefinition: true, scope: null, file: !15, type: !25, variable: %struct.C** @x)
 !28 = !{i32 2, !"Dwarf Version", i32 4}
@@ -241,7 +241,7 @@ attributes #3 = { nounwind }
 !40 = !DILocation(line: 9, scope: !41, inlinedAt: !32)
 !41 = distinct !DILexicalBlock(line: 9, column: 0, file: !5, scope: !22)
 !42 = !{!43, !44, i64 0}
-!43 = !{!"_ZTS1C", !44, i64 0}
+!43 = !{!4, !44, i64 0}
 !44 = !{!"int", !35, i64 0}
 !45 = !DILocation(line: 9, scope: !46, inlinedAt: !32)
 !46 = distinct !DILexicalBlock(line: 9, column: 0, file: !5, scope: !41)

Modified: llvm/trunk/test/DebugInfo/Generic/tu-composite.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/tu-composite.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/tu-composite.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/tu-composite.ll Sat Apr 23 16:08:00 2016
@@ -127,7 +127,7 @@ attributes #1 = { nounwind readnone }
 !1 = !DIFile(filename: "tmp.cpp", directory: ".")
 !2 = !{}
 !3 = !{!4, !18, !19, !22, !23, !24}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 1, file: !1, elements: !5, vtableHolder: !"_ZTS1C", identifier: "_ZTS1C")
+!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 1, file: !1, elements: !5, vtableHolder: !4, identifier: "_ZTS1C")
 !5 = !{!6, !13}
 !6 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$C", flags: DIFlagArtificial, file: !1, scope: !7, baseType: !8)
 !7 = !DIFile(filename: "tmp.cpp", directory: ".")
@@ -136,46 +136,46 @@ attributes #1 = { nounwind readnone }
 !10 = !DISubroutineType(types: !11)
 !11 = !{!12}
 !12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!13 = !DISubprogram(name: "foo", linkageName: "_ZN1C3fooEv", line: 2, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS1C", type: !14, containingType: !"_ZTS1C")
+!13 = !DISubprogram(name: "foo", linkageName: "_ZN1C3fooEv", line: 2, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !4, type: !14, containingType: !4)
 !14 = !DISubroutineType(types: !15)
 !15 = !{null, !16}
-!16 = !DIDerivedType(tag: DW_TAG_pointer_type, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C")
+!16 = !DIDerivedType(tag: DW_TAG_pointer_type, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !18 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", line: 7, size: 8, align: 8, file: !1, elements: !2, identifier: "_ZTS3bar")
 !19 = !DICompositeType(tag: DW_TAG_structure_type, name: "D", line: 9, size: 8, align: 8, file: !1, elements: !20, identifier: "_ZTS1D")
 !20 = !{!21}
-!21 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 11, flags: DIFlagStaticMember, file: !1, scope: !"_ZTS1D", baseType: !12)
-!22 = !DICompositeType(tag: DW_TAG_structure_type, name: "Nested", line: 12, size: 8, align: 8, file: !1, scope: !"_ZTS1D", elements: !2, identifier: "_ZTSN1D6NestedE")
-!23 = !DICompositeType(tag: DW_TAG_structure_type, name: "Nested2", line: 13, flags: DIFlagFwdDecl, file: !1, scope: !"_ZTS1D", identifier: "_ZTSN1D7Nested2E")
-!24 = !DICompositeType(tag: DW_TAG_structure_type, name: "virt<bar>", line: 15, file: !1, scope: !"_ZTS1D", elements: !25, templateParams: !28, identifier: "_ZTSN1D4virtI3barEE")
+!21 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 11, flags: DIFlagStaticMember, file: !1, scope: !19, baseType: !12)
+!22 = !DICompositeType(tag: DW_TAG_structure_type, name: "Nested", line: 12, size: 8, align: 8, file: !1, scope: !19, elements: !2, identifier: "_ZTSN1D6NestedE")
+!23 = !DICompositeType(tag: DW_TAG_structure_type, name: "Nested2", line: 13, flags: DIFlagFwdDecl, file: !1, scope: !19, identifier: "_ZTSN1D7Nested2E")
+!24 = !DICompositeType(tag: DW_TAG_structure_type, name: "virt<bar>", line: 15, file: !1, scope: !19, elements: !25, templateParams: !28, identifier: "_ZTSN1D4virtI3barEE")
 !25 = !{!26}
-!26 = !DIDerivedType(tag: DW_TAG_member, name: "values", line: 16, size: 64, align: 64, file: !1, scope: !"_ZTSN1D4virtI3barEE", baseType: !27)
-!27 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3bar")
+!26 = !DIDerivedType(tag: DW_TAG_member, name: "values", line: 16, size: 64, align: 64, file: !1, scope: !24, baseType: !27)
+!27 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !18)
 !28 = !{!29}
-!29 = !DITemplateTypeParameter(name: "T", type: !"_ZTS3bar")
+!29 = !DITemplateTypeParameter(name: "T", type: !18)
 !31 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1C3fooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: null, type: !14, declaration: !13, variables: !2)
 !32 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 20, file: !1, scope: !7, type: !33, variables: !2)
 !33 = !DISubroutineType(types: !34)
 !34 = !{null}
 !35 = !{i32 2, !"Dwarf Version", i32 2}
 !36 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !31, type: !37)
-!37 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C")
+!37 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !38 = !DILocation(line: 0, scope: !31)
 !39 = !DILocation(line: 5, scope: !31)
 !40 = !DILocalVariable(name: "B", line: 21, scope: !32, file: !7, type: !41)
-!41 = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", line: 8, file: !1, baseType: !"_ZTS3bar")
+!41 = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", line: 8, file: !1, baseType: !18)
 !42 = !DILocation(line: 21, scope: !32)
 !43 = !DILocalVariable(name: "A", line: 22, scope: !32, file: !7, type: !44)
-!44 = !DICompositeType(tag: DW_TAG_array_type, size: 24, align: 8, baseType: !"_ZTS3bar", elements: !45)
+!44 = !DICompositeType(tag: DW_TAG_array_type, size: 24, align: 8, baseType: !18, elements: !45)
 !45 = !{!46}
 !46 = !DISubrange(count: 3)
 !47 = !DILocation(line: 22, scope: !32)
 !48 = !DILocalVariable(name: "B2", line: 23, scope: !32, file: !7, type: !49)
-!49 = !DIDerivedType(tag: DW_TAG_typedef, name: "baz2", line: 10, file: !1, scope: !"_ZTS1D", baseType: !"_ZTS3bar")
+!49 = !DIDerivedType(tag: DW_TAG_typedef, name: "baz2", line: 10, file: !1, scope: !19, baseType: !18)
 !50 = !DILocation(line: 23, scope: !32)
 !51 = !DILocalVariable(name: "e", line: 24, scope: !32, file: !7, type: !22)
 !52 = !DILocation(line: 24, scope: !32)
 !53 = !DILocalVariable(name: "p", line: 25, scope: !32, file: !7, type: !54)
-!54 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTSN1D7Nested2E")
+!54 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !23)
 !55 = !DILocation(line: 25, scope: !32)
 !56 = !DILocalVariable(name: "t", line: 26, scope: !32, file: !7, type: !24)
 !57 = !DILocation(line: 26, scope: !32)

Modified: llvm/trunk/test/DebugInfo/Generic/tu-member-pointer.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/tu-member-pointer.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/tu-member-pointer.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/tu-member-pointer.ll Sat Apr 23 16:08:00 2016
@@ -24,7 +24,7 @@
 !5 = !{!6}
 !6 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !7, type: !8, variable: i64* @x)
 !7 = !DIFile(filename: "foo.cpp", directory: ".")
-!8 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !9, extraData: !"_ZTS3Foo")
+!8 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !9, extraData: !4)
 !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !10 = !{i32 2, !"Dwarf Version", i32 2}
 !11 = !{i32 1, !"Debug Info Version", i32 3}

Modified: llvm/trunk/test/DebugInfo/Generic/varargs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/varargs.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/varargs.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/varargs.ll Sat Apr 23 16:08:00 2016
@@ -78,10 +78,10 @@ attributes #1 = { nounwind readnone }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 3, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A")
 !5 = !{!6}
-!6 = !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !7)
+!6 = !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !4, type: !7)
 !7 = !DISubroutineType(types: !8)
 !8 = !{null, !9, !10, null}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !14 = distinct !DISubprogram(name: "b", linkageName: "_Z1biz", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 13, file: !1, scope: !15, type: !16, variables: !2)
 !15 = !DIFile(filename: "llvm/tools/clang/test/CodeGenCXX/debug-info-varargs.cpp", directory: "radar/13690847")

Modified: llvm/trunk/test/DebugInfo/Generic/virtual-index.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/virtual-index.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/virtual-index.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/virtual-index.ll Sat Apr 23 16:08:00 2016
@@ -42,7 +42,7 @@ define void @_ZN1A1gEv(%struct.A* %this)
 !1 = !DIFile(filename: "x", directory: "x")
 !2 = !{}
 !3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !1, line: 1, size: 64, align: 64, elements: !5, vtableHolder: !"_ZTS1A", identifier: "_ZTS1A")
+!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !1, line: 1, size: 64, align: 64, elements: !5, vtableHolder: !4, identifier: "_ZTS1A")
 !5 = !{!6, !12, !16}
 !6 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", scope: !1, file: !1, baseType: !7, size: 64, flags: DIFlagArtificial)
 !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64)
@@ -50,18 +50,18 @@ define void @_ZN1A1gEv(%struct.A* %this)
 !9 = !DISubroutineType(types: !10)
 !10 = !{!11}
 !11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!12 = !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", scope: !"_ZTS1A", file: !1, line: 2, type: !13, isLocal: false, isDefinition: false, scopeLine: 2, containingType: !"_ZTS1A", virtuality: DW_VIRTUALITY_virtual, virtualIndex: 0, flags: DIFlagPrototyped, isOptimized: false)
+!12 = !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", scope: !4, file: !1, line: 2, type: !13, isLocal: false, isDefinition: false, scopeLine: 2, containingType: !4, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 0, flags: DIFlagPrototyped, isOptimized: false)
 !13 = !DISubroutineType(types: !14)
 !14 = !{null, !15}
-!15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A", size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
-!16 = !DISubprogram(name: "g", linkageName: "_ZN1A1gEv", scope: !"_ZTS1A", file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, containingType: !"_ZTS1A", virtuality: DW_VIRTUALITY_virtual, virtualIndex: 4294967295, flags: DIFlagPrototyped, isOptimized: false)
-!18 = distinct !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", scope: !"_ZTS1A", file: !1, line: 6, type: !13, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2)
-!19 = distinct !DISubprogram(name: "g", linkageName: "_ZN1A1gEv", scope: !"_ZTS1A", file: !1, line: 7, type: !13, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !16, variables: !2)
+!15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!16 = !DISubprogram(name: "g", linkageName: "_ZN1A1gEv", scope: !4, file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, containingType: !4, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 4294967295, flags: DIFlagPrototyped, isOptimized: false)
+!18 = distinct !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", scope: !4, file: !1, line: 6, type: !13, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2)
+!19 = distinct !DISubprogram(name: "g", linkageName: "_ZN1A1gEv", scope: !4, file: !1, line: 7, type: !13, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !16, variables: !2)
 !20 = !{i32 2, !"Dwarf Version", i32 4}
 !21 = !{i32 2, !"Debug Info Version", i32 3}
 !22 = !{!"clang version 3.9.0 (trunk 263469) (llvm/trunk 263156)"}
 !23 = !DILocalVariable(name: "this", arg: 1, scope: !18, type: !24, flags: DIFlagArtificial | DIFlagObjectPointer)
-!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A", size: 64, align: 64)
+!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
 !25 = !DIExpression()
 !26 = !DILocation(line: 0, scope: !18)
 !27 = !DILocation(line: 6, column: 14, scope: !18)

Modified: llvm/trunk/test/DebugInfo/X86/DW_AT_linkage_name.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/DW_AT_linkage_name.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/DW_AT_linkage_name.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/DW_AT_linkage_name.ll Sat Apr 23 16:08:00 2016
@@ -83,16 +83,16 @@ attributes #2 = { ssp uwtable }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A")
 !5 = !{!6, !12}
-!6 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS1A", type: !7)
+!6 = !DISubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !4, type: !7)
 !7 = !DISubroutineType(types: !8)
 !8 = !{null, !9, !10}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!12 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !13)
+!12 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !4, type: !13)
 !13 = !DISubroutineType(types: !14)
 !14 = !{null, !9}
-!17 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !13, declaration: !12, variables: !2)
-!18 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !13, declaration: !12, variables: !2)
+!17 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !4, type: !13, declaration: !12, variables: !2)
+!18 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !4, type: !13, declaration: !12, variables: !2)
 !19 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !20, type: !21, variables: !2)
 !20 = !DIFile(filename: "linkage-name.cpp", directory: "")
 !21 = !DISubroutineType(types: !22)
@@ -101,13 +101,13 @@ attributes #2 = { ssp uwtable }
 !24 = !{i32 1, !"Debug Info Version", i32 3}
 !25 = !{!"clang version 3.5.0 "}
 !26 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !27)
-!27 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A")
+!27 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !28 = !DILocation(line: 0, scope: !17)
 !29 = !DILocation(line: 8, scope: !17)
 !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !18, type: !27)
 !31 = !DILocation(line: 0, scope: !18)
 !32 = !DILocation(line: 6, scope: !18)
 !33 = !DILocation(line: 8, scope: !18)
-!34 = !DILocalVariable(name: "a", line: 11, scope: !19, file: !20, type: !"_ZTS1A")
+!34 = !DILocalVariable(name: "a", line: 11, scope: !19, file: !20, type: !4)
 !35 = !DILocation(line: 11, scope: !19)
 !36 = !DILocation(line: 12, scope: !19)

Modified: llvm/trunk/test/DebugInfo/X86/constant-aggregate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/constant-aggregate.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/constant-aggregate.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/constant-aggregate.ll Sat Apr 23 16:08:00 2016
@@ -78,23 +78,23 @@ attributes #1 = { nounwind readnone }
 !3 = !{!4, !8}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, line: 1, size: 32, align: 32, file: !1, elements: !5, identifier: "_ZTS1S")
 !5 = !{!6}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 1, size: 32, align: 32, file: !1, scope: !"_ZTS1S", baseType: !7)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 1, size: 32, align: 32, file: !1, scope: !4, baseType: !7)
 !7 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned)
 !8 = !DICompositeType(tag: DW_TAG_class_type, name: "C", line: 8, size: 32, align: 32, file: !1, elements: !9, identifier: "_ZTS1C")
 !9 = !{!10}
-!10 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 8, size: 32, align: 32, flags: DIFlagPublic, file: !1, scope: !"_ZTS1C", baseType: !7)
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 8, size: 32, align: 32, flags: DIFlagPublic, file: !1, scope: !8, baseType: !7)
 !12 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foo1S", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !13, type: !14, variables: !17)
 !13 = !DIFile(filename: "sroasplit-4.cpp", directory: "")
 !14 = !DISubroutineType(types: !15)
 !15 = !{!7, !16}
-!16 = !DIDerivedType(tag: DW_TAG_typedef, name: "S", line: 1, file: !1, baseType: !"_ZTS1S")
+!16 = !DIDerivedType(tag: DW_TAG_typedef, name: "S", line: 1, file: !1, baseType: !4)
 !17 = !{!18}
 !18 = !DILocalVariable(name: "s", line: 3, arg: 1, scope: !12, file: !13, type: !16)
 !19 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foo1C", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 10, file: !1, scope: !13, type: !20, variables: !22)
 !20 = !DISubroutineType(types: !21)
-!21 = !{!7, !"_ZTS1C"}
+!21 = !{!7, !8}
 !22 = !{!23}
-!23 = !DILocalVariable(name: "c", line: 10, arg: 1, scope: !19, file: !13, type: !"_ZTS1C")
+!23 = !DILocalVariable(name: "c", line: 10, arg: 1, scope: !19, file: !13, type: !8)
 !24 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 15, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 15, file: !1, scope: !13, type: !25, variables: !27)
 !25 = !DISubroutineType(types: !26)
 !26 = !{!7}

Modified: llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll Sat Apr 23 16:08:00 2016
@@ -67,17 +67,17 @@ attributes #1 = { nounwind readnone }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 32, align: 32, file: !1, elements: !5, identifier: "_ZTS1A")
 !5 = !{!6, !8}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 5, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !"_ZTS1A", baseType: !7)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 5, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !4, baseType: !7)
 !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DISubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !9)
+!8 = !DISubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !4, type: !9)
 !9 = !DISubroutineType(types: !10)
 !10 = !{null, !11, !7}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !14 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !15, type: !16, variables: !2)
 !15 = !DIFile(filename: "baz.cpp", directory: "/usr/local/google/home/echristo/tmp")
 !16 = !DISubroutineType(types: !17)
 !17 = !{null}
-!18 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !9, declaration: !8, variables: !2)
+!18 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !4, type: !9, declaration: !8, variables: !2)
 !19 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !15, type: !20, variables: !2)
 !20 = !DISubroutineType(types: !2)
 !21 = !{!22}
@@ -87,7 +87,7 @@ attributes #1 = { nounwind readnone }
 !25 = !{!"clang version 3.5 (trunk 199923) (llvm/trunk 199940)"}
 !26 = !DILocation(line: 8, scope: !14)
 !27 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !18, type: !28)
-!28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A")
+!28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !29 = !DILocation(line: 0, scope: !18)
 !30 = !DILocalVariable(name: "i", line: 3, arg: 2, scope: !18, file: !15, type: !7)
 !31 = !DILocation(line: 3, scope: !18)

Modified: llvm/trunk/test/DebugInfo/X86/data_member_location.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/data_member_location.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/data_member_location.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/data_member_location.ll Sat Apr 23 16:08:00 2016
@@ -40,9 +40,9 @@
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 64, align: 32, file: !1, elements: !5, identifier: "_ZTS3foo")
 !5 = !{!6, !8}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "c", line: 2, size: 8, align: 8, file: !1, scope: !"_ZTS3foo", baseType: !7)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "c", line: 2, size: 8, align: 8, file: !1, scope: !4, baseType: !7)
 !7 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!8 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 3, size: 32, align: 32, offset: 32, file: !1, scope: !"_ZTS3foo", baseType: !9)
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 3, size: 32, align: 32, offset: 32, file: !1, scope: !4, baseType: !9)
 !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !10 = !{!11}
 !11 = !DIGlobalVariable(name: "f", line: 6, isLocal: false, isDefinition: true, scope: null, file: !12, type: !4, variable: %struct.foo* @f)

Modified: llvm/trunk/test/DebugInfo/X86/debug-info-access.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-info-access.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/debug-info-access.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/debug-info-access.ll Sat Apr 23 16:08:00 2016
@@ -112,37 +112,37 @@ attributes #0 = { nounwind ssp uwtable }
 !3 = !{!4, !12, !22}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 3, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A")
 !5 = !{!6, !8}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "pub_default_static", line: 7, flags: DIFlagStaticMember, file: !1, scope: !"_ZTS1A", baseType: !7)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "pub_default_static", line: 7, flags: DIFlagStaticMember, file: !1, scope: !4, baseType: !7)
 !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DISubprogram(name: "pub_default", linkageName: "_ZN1A11pub_defaultEv", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !"_ZTS1A", type: !9)
+!8 = !DISubprogram(name: "pub_default", linkageName: "_ZN1A11pub_defaultEv", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !4, type: !9)
 !9 = !DISubroutineType(types: !10)
 !10 = !{null, !11}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !12 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 11, size: 8, align: 8, file: !1, elements: !13, identifier: "_ZTS1B")
 !13 = !{!14, !15, !16, !20, !21}
-!14 = !DIDerivedType(tag: DW_TAG_inheritance, flags: DIFlagPublic, scope: !"_ZTS1B", baseType: !"_ZTS1A")
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "public_static", line: 16, flags: DIFlagPublic | DIFlagStaticMember, file: !1, scope: !"_ZTS1B", baseType: !7)
-!16 = !DISubprogram(name: "pub", linkageName: "_ZN1B3pubEv", line: 14, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 14, file: !1, scope: !"_ZTS1B", type: !17)
+!14 = !DIDerivedType(tag: DW_TAG_inheritance, flags: DIFlagPublic, scope: !12, baseType: !4)
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "public_static", line: 16, flags: DIFlagPublic | DIFlagStaticMember, file: !1, scope: !12, baseType: !7)
+!16 = !DISubprogram(name: "pub", linkageName: "_ZN1B3pubEv", line: 14, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 14, file: !1, scope: !12, type: !17)
 !17 = !DISubroutineType(types: !18)
 !18 = !{null, !19}
-!19 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B")
-!20 = !DISubprogram(name: "prot", linkageName: "_ZN1B4protEv", line: 19, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !1, scope: !"_ZTS1B", type: !17)
-!21 = !DISubprogram(name: "priv_default", linkageName: "_ZN1B12priv_defaultEv", line: 22, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 22, file: !1, scope: !"_ZTS1B", type: !17)
+!19 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12)
+!20 = !DISubprogram(name: "prot", linkageName: "_ZN1B4protEv", line: 19, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !1, scope: !12, type: !17)
+!21 = !DISubprogram(name: "priv_default", linkageName: "_ZN1B12priv_defaultEv", line: 22, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 22, file: !1, scope: !12, type: !17)
 !22 = !DICompositeType(tag: DW_TAG_union_type, name: "U", line: 25, size: 32, align: 32, file: !1, elements: !23, identifier: "_ZTS1U")
 !23 = !{!24, !25}
-!24 = !DIDerivedType(tag: DW_TAG_member, name: "union_priv", line: 30, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !"_ZTS1U", baseType: !7)
-!25 = !DISubprogram(name: "union_pub_default", linkageName: "_ZN1U17union_pub_defaultEv", line: 27, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 27, file: !1, scope: !"_ZTS1U", type: !26)
+!24 = !DIDerivedType(tag: DW_TAG_member, name: "union_priv", line: 30, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !22, baseType: !7)
+!25 = !DISubprogram(name: "union_pub_default", linkageName: "_ZN1U17union_pub_defaultEv", line: 27, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 27, file: !1, scope: !22, type: !26)
 !26 = !DISubroutineType(types: !27)
 !27 = !{null, !28}
-!28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1U")
+!28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !22)
 !30 = distinct !DISubprogram(name: "free", linkageName: "_Z4freev", line: 35, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 35, file: !1, scope: !31, type: !32, variables: !2)
 !31 = !DIFile(filename: "/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp", directory: "")
 !32 = !DISubroutineType(types: !33)
 !33 = !{null}
 !34 = !{!35, !36, !37}
-!35 = !DIGlobalVariable(name: "a", line: 37, isLocal: false, isDefinition: true, scope: null, file: !31, type: !"_ZTS1A", variable: %struct.A* @a)
-!36 = !DIGlobalVariable(name: "b", line: 38, isLocal: false, isDefinition: true, scope: null, file: !31, type: !"_ZTS1B", variable: %class.B* @b)
-!37 = !DIGlobalVariable(name: "u", line: 39, isLocal: false, isDefinition: true, scope: null, file: !31, type: !"_ZTS1U", variable: %union.U* @u)
+!35 = !DIGlobalVariable(name: "a", line: 37, isLocal: false, isDefinition: true, scope: null, file: !31, type: !4, variable: %struct.A* @a)
+!36 = !DIGlobalVariable(name: "b", line: 38, isLocal: false, isDefinition: true, scope: null, file: !31, type: !12, variable: %class.B* @b)
+!37 = !DIGlobalVariable(name: "u", line: 39, isLocal: false, isDefinition: true, scope: null, file: !31, type: !22, variable: %union.U* @u)
 !38 = !{i32 2, !"Dwarf Version", i32 2}
 !39 = !{i32 2, !"Debug Info Version", i32 3}
 !40 = !{!"clang version 3.6.0 "}

Modified: llvm/trunk/test/DebugInfo/X86/debug-loc-offset.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-loc-offset.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/debug-loc-offset.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/debug-loc-offset.ll Sat Apr 23 16:08:00 2016
@@ -138,7 +138,7 @@ attributes #2 = { "less-precise-fpmad"="
 !21 = !DILocalVariable(name: "b", line: 1, arg: 1, scope: !4, file: !5, type: !8)
 !22 = !DILocation(line: 1, scope: !4)
 !23 = !DILocation(line: 2, scope: !4)
-!24 = !DILocalVariable(name: "a", line: 6, arg: 1, scope: !14, file: !15, type: !"_ZTS1A")
+!24 = !DILocalVariable(name: "a", line: 6, arg: 1, scope: !14, file: !15, type: !12)
 !25 = !DILocation(line: 6, scope: !14)
 !26 = !DILocalVariable(name: "z", line: 7, scope: !14, file: !15, type: !8)
 !27 = !DILocation(line: 7, scope: !14)

Modified: llvm/trunk/test/DebugInfo/X86/decl-derived-member.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/decl-derived-member.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/decl-derived-member.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/decl-derived-member.ll Sat Apr 23 16:08:00 2016
@@ -106,35 +106,35 @@ attributes #4 = { "less-precise-fpmad"="
 !3 = !{!4, !8}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 5, size: 64, align: 64, file: !1, elements: !5, identifier: "_ZTS3foo")
 !5 = !{!6}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, size: 64, align: 64, file: !1, scope: !"_ZTS3foo", baseType: !7)
-!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "base_type", line: 4, file: !1, baseType: !"_ZTS4base")
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, size: 64, align: 64, file: !1, scope: !4, baseType: !7)
+!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "base_type", line: 4, file: !1, baseType: !8)
 !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "base", line: 1, flags: DIFlagFwdDecl, file: !1, identifier: "_ZTS4base")
 !10 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !11, type: !12, variables: !2)
 !11 = !DIFile(filename: "decl-derived-member.cpp", directory: "/tmp/dbginfo")
 !12 = !DISubroutineType(types: !13)
 !13 = !{null}
-!14 = distinct !DISubprogram(name: "foo", linkageName: "_ZN3fooC2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !"_ZTS3foo", type: !15, declaration: !18, variables: !2)
+!14 = distinct !DISubprogram(name: "foo", linkageName: "_ZN3fooC2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !4, type: !15, declaration: !18, variables: !2)
 !15 = !DISubroutineType(types: !16)
 !16 = !{null, !17}
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS3foo")
-!18 = !DISubprogram(name: "foo", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !"_ZTS3foo", type: !15)
-!19 = distinct !DISubprogram(name: "base", linkageName: "_ZN4baseC2Ev", line: 1, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !"_ZTS4base", type: !20, declaration: !23, variables: !2)
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!18 = !DISubprogram(name: "foo", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !4, type: !15)
+!19 = distinct !DISubprogram(name: "base", linkageName: "_ZN4baseC2Ev", line: 1, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !8, type: !20, declaration: !23, variables: !2)
 !20 = !DISubroutineType(types: !21)
 !21 = !{null, !22}
-!22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS4base")
-!23 = !DISubprogram(name: "base", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !"_ZTS4base", type: !20)
-!24 = distinct !DISubprogram(name: "~foo", linkageName: "_ZN3fooD2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !"_ZTS3foo", type: !15, declaration: !25, variables: !2)
-!25 = !DISubprogram(name: "~foo", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !"_ZTS3foo", type: !15)
+!22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8)
+!23 = !DISubprogram(name: "base", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !8, type: !20)
+!24 = distinct !DISubprogram(name: "~foo", linkageName: "_ZN3fooD2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !4, type: !15, declaration: !25, variables: !2)
+!25 = !DISubprogram(name: "~foo", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !4, type: !15)
 !26 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_decl_derived_member.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !11, type: !27, variables: !2)
 !27 = !DISubroutineType(types: !2)
 !28 = !{!29}
-!29 = !DIGlobalVariable(name: "f", line: 8, isLocal: false, isDefinition: true, scope: null, file: !11, type: !"_ZTS3foo", variable: %struct.foo* @f)
+!29 = !DIGlobalVariable(name: "f", line: 8, isLocal: false, isDefinition: true, scope: null, file: !11, type: !4, variable: %struct.foo* @f)
 !30 = !{i32 2, !"Dwarf Version", i32 4}
 !31 = !{i32 2, !"Debug Info Version", i32 3}
 !32 = !{!"clang version 3.7.0 (trunk 227104) (llvm/trunk 227103)"}
 !33 = !DILocation(line: 8, column: 5, scope: !10)
 !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !14, type: !35)
-!35 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3foo")
+!35 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !36 = !DIExpression()
 !37 = !DILocation(line: 0, scope: !14)
 !38 = !DILocation(line: 5, column: 8, scope: !14)
@@ -144,7 +144,7 @@ attributes #4 = { "less-precise-fpmad"="
 !42 = distinct !DILexicalBlock(line: 5, column: 8, file: !1, scope: !24)
 !43 = !DILocation(line: 5, column: 8, scope: !24)
 !44 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !19, type: !45)
-!45 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS4base")
+!45 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8)
 !46 = !DILocation(line: 0, scope: !19)
 !47 = !DILocation(line: 1, column: 8, scope: !19)
 !48 = !DILocation(line: 0, scope: !26)

Modified: llvm/trunk/test/DebugInfo/X86/deleted-bit-piece.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/deleted-bit-piece.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/deleted-bit-piece.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/deleted-bit-piece.ll Sat Apr 23 16:08:00 2016
@@ -34,12 +34,12 @@ declare void @llvm.dbg.value(metadata, i
 !5 = !{!6}
 !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "Class", size: 64, align: 64, elements: !7, identifier: "_ZT5Class")
 !7 = !{!8, !10}
-!8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !"_ZT5Class", baseType: !9, size: 32, align: 32)
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !6, baseType: !9, size: 32, align: 32)
 !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !"_ZT5Class", baseType: !9, size: 32, align: 32)
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !6, baseType: !9, size: 32, align: 32)
 !12 = distinct !DISubprogram(name: "foo", scope: null, file: !3, type: !13, isLocal: false, isDefinition: true, isOptimized: false, unit: !2)
 !13 = !DISubroutineType(types: !14)
 !14 = !{null}
-!15 = !DILocalVariable(name: "v", scope: !12, type: !"_ZT5Class")
+!15 = !DILocalVariable(name: "v", scope: !12, type: !6)
 !16 = !DIExpression(DW_OP_bit_piece, 32, 32)
 !17 = !DILocation(line: 2755, column: 9, scope: !12)

Modified: llvm/trunk/test/DebugInfo/X86/externaltyperef.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/externaltyperef.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/externaltyperef.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/externaltyperef.ll Sat Apr 23 16:08:00 2016
@@ -39,12 +39,12 @@ target triple = "x86_64-apple-macosx10.1
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTS1A")
 !5 = !{!6}
 !6 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, variable: %class.A** @a)
-!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A", size: 64, align: 64)
+!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
 !8 = !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTS1B")
 !9 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTSN1N1BE")
 !10 = !DINamespace(name: "N", scope: null, file: !1, line: 1)
 !11 = !{!12}
-!12 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !"_ZTSN1N1BE", line: 4)
+!12 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !9, line: 4)
 !13 = !{i32 2, !"Dwarf Version", i32 2}
 !14 = !{i32 2, !"Debug Info Version", i32 3}
 !15 = !{i32 1, !"PIC Level", i32 2}

Modified: llvm/trunk/test/DebugInfo/X86/fission-inline.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-inline.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-inline.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-inline.ll Sat Apr 23 16:08:00 2016
@@ -98,19 +98,19 @@ attributes #1 = { "less-precise-fpmad"="
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS3foo")
 !5 = !{!6}
-!6 = !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", line: 4, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !"_ZTS3foo", type: !7)
+!6 = !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", line: 4, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !4, type: !7)
 !7 = !DISubroutineType(types: !8)
 !8 = !{null, null}
-!10 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", line: 15, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 15, file: !1, scope: !"_ZTS3foo", type: !7, declaration: !6, variables: !2)
-!11 = distinct !DISubprogram(name: "f2<int>", linkageName: "_ZN3foo2f2IiEEvv", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !"_ZTS3foo", type: !12, templateParams: !14, declaration: !17, variables: !2)
+!10 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", line: 15, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 15, file: !1, scope: !4, type: !7, declaration: !6, variables: !2)
+!11 = distinct !DISubprogram(name: "f2<int>", linkageName: "_ZN3foo2f2IiEEvv", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !4, type: !12, templateParams: !14, declaration: !17, variables: !2)
 !12 = !DISubroutineType(types: !13)
 !13 = !{null}
 !14 = !{!15}
 !15 = !DITemplateTypeParameter(name: "T", type: !16)
 !16 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!17 = !DISubprogram(name: "f2<int>", linkageName: "_ZN3foo2f2IiEEvv", line: 10, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !"_ZTS3foo", type: !12, templateParams: !14)
+!17 = !DISubprogram(name: "f2<int>", linkageName: "_ZN3foo2f2IiEEvv", line: 10, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !4, type: !12, templateParams: !14)
 !18 = !{!19}
-!19 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 19, scope: !20, entity: !"_ZTS3foo")
+!19 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 19, scope: !20, entity: !4)
 !20 = distinct !DILexicalBlock(line: 16, column: 13, file: !1, scope: !21)
 !21 = distinct !DILexicalBlock(line: 16, column: 7, file: !1, scope: !10)
 !22 = !{i32 2, !"Dwarf Version", i32 4}

Modified: llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll Sat Apr 23 16:08:00 2016
@@ -230,16 +230,16 @@ attributes #1 = { nounwind readnone }
 !8 = !DINamespace(name: "capybara", line: 11, file: !1, scope: !9)
 !9 = !DINamespace(name: "echidna", line: 10, file: !1, scope: null)
 !10 = !{!11, !13}
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 14, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !"_ZTSN7echidna8capybara8mongoose6fluffyE", baseType: !12)
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 14, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !6, baseType: !12)
 !12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 15, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !1, scope: !"_ZTSN7echidna8capybara8mongoose6fluffyE", baseType: !12)
+!13 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 15, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !1, scope: !6, baseType: !12)
 !14 = !DICompositeType(tag: DW_TAG_structure_type, name: "wombat", line: 31, size: 64, align: 32, file: !1, elements: !15, identifier: "_ZTS6wombat")
 !15 = !{!16}
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "a_b", line: 35, size: 64, align: 32, file: !1, scope: !"_ZTS6wombat", baseType: !"_ZTSN6wombatUt_E")
-!17 = !DICompositeType(tag: DW_TAG_structure_type, line: 32, size: 64, align: 32, file: !1, scope: !"_ZTS6wombat", elements: !18, identifier: "_ZTSN6wombatUt_E")
+!16 = !DIDerivedType(tag: DW_TAG_member, name: "a_b", line: 35, size: 64, align: 32, file: !1, scope: !14, baseType: !17)
+!17 = !DICompositeType(tag: DW_TAG_structure_type, line: 32, size: 64, align: 32, file: !1, scope: !14, elements: !18, identifier: "_ZTSN6wombatUt_E")
 !18 = !{!19, !20}
-!19 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 33, size: 32, align: 32, file: !1, scope: !"_ZTSN6wombatUt_E", baseType: !12)
-!20 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 34, size: 32, align: 32, offset: 32, file: !1, scope: !"_ZTSN6wombatUt_E", baseType: !12)
+!19 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 33, size: 32, align: 32, file: !1, scope: !17, baseType: !12)
+!20 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 34, size: 32, align: 32, offset: 32, file: !1, scope: !17, baseType: !12)
 !22 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !23, type: !24, variables: !2)
 !23 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
 !24 = !DISubroutineType(types: !25)

Modified: llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll Sat Apr 23 16:08:00 2016
@@ -306,21 +306,21 @@ attributes #1 = { nounwind readnone }
 !3 = !{!4, !15}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !1, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS1C")
 !5 = !{!6, !8, !12}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !"_ZTS1C", file: !1, line: 4, baseType: !7, flags: DIFlagStaticMember)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !4, file: !1, line: 4, baseType: !7, flags: DIFlagStaticMember)
 !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !"_ZTS1C", file: !1, line: 2, type: !9, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
+!8 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !4, file: !1, line: 2, type: !9, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
 !9 = !DISubroutineType(types: !10)
 !10 = !{null, !11}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1C", size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
-!12 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !"_ZTS1C", file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false)
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!12 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !4, file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false)
 !13 = !DISubroutineType(types: !14)
 !14 = !{!7}
 !15 = !DICompositeType(tag: DW_TAG_structure_type, name: "D", scope: !16, file: !1, line: 29, size: 32, align: 32, elements: !17, identifier: "_ZTSN2ns1DE")
 !16 = !DINamespace(name: "ns", scope: null, file: !1, line: 23)
 !17 = !{!18}
-!18 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !"_ZTSN2ns1DE", file: !1, line: 30, baseType: !7, size: 32, align: 32)
-!20 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !"_ZTS1C", file: !1, line: 9, type: !9, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !8, variables: !2)
-!21 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !"_ZTS1C", file: !1, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2)
+!18 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !15, file: !1, line: 30, baseType: !7, size: 32, align: 32)
+!20 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !4, file: !1, line: 9, type: !9, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !8, variables: !2)
+!21 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !4, file: !1, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2)
 !22 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !1, file: !1, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
 !23 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !16, file: !1, line: 24, type: !24, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
 !24 = !DISubroutineType(types: !25)
@@ -332,9 +332,9 @@ attributes #1 = { nounwind readnone }
 !30 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !1, file: !1, line: 57, type: !13, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
 !31 = !{!32, !33, !34, !35, !36, !37, !39, !41}
 !32 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !0, file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN1C22static_member_variableE, declaration: !6)
-!33 = !DIGlobalVariable(name: "global_variable", scope: !0, file: !1, line: 17, type: !"_ZTS1C", isLocal: false, isDefinition: true, variable: %struct.C* @global_variable)
+!33 = !DIGlobalVariable(name: "global_variable", scope: !0, file: !1, line: 17, type: !4, isLocal: false, isDefinition: true, variable: %struct.C* @global_variable)
 !34 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !16, file: !1, line: 27, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN2ns25global_namespace_variableE)
-!35 = !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !16, file: !1, line: 31, type: !"_ZTSN2ns1DE", isLocal: false, isDefinition: true, variable: %"struct.ns::D"* @_ZN2ns1dE)
+!35 = !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !16, file: !1, line: 31, type: !15, isLocal: false, isDefinition: true, variable: %"struct.ns::D"* @_ZN2ns1dE)
 !36 = !DIGlobalVariable(name: "z", scope: !26, file: !1, line: 41, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZZ2f3vE1z)
 !37 = !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !38, file: !1, line: 37, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_11iE)
 !38 = !DINamespace(scope: null, file: !1, line: 36)
@@ -351,7 +351,7 @@ attributes #1 = { nounwind readnone }
 !49 = !{i32 2, !"Debug Info Version", i32 3}
 !50 = !{!"clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)"}
 !51 = !DILocalVariable(name: "this", arg: 1, scope: !20, type: !52, flags: DIFlagArtificial | DIFlagObjectPointer)
-!52 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1C", size: 64, align: 64)
+!52 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
 !53 = !DIExpression()
 !54 = !DILocation(line: 0, scope: !20)
 !55 = !DILocation(line: 10, scope: !20)

Modified: llvm/trunk/test/DebugInfo/X86/inline-member-function.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/inline-member-function.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/inline-member-function.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/inline-member-function.ll Sat Apr 23 16:08:00 2016
@@ -71,16 +71,16 @@ attributes #1 = { nounwind readnone }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS3foo")
 !5 = !{!6}
-!6 = !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS3foo", type: !7)
+!6 = !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !4, type: !7)
 !7 = !DISubroutineType(types: !8)
 !8 = !{!9, !10, !9}
 !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS3foo")
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !13 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !14, type: !15, variables: !2)
 !14 = !DIFile(filename: "inline.cpp", directory: "/tmp/dbginfo")
 !15 = !DISubroutineType(types: !16)
 !16 = !{!9}
-!17 = distinct !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !"_ZTS3foo", type: !7, declaration: !6, variables: !2)
+!17 = distinct !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !4, type: !7, declaration: !6, variables: !2)
 !18 = !{!19}
 !19 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: null, file: !14, type: !9, variable: i32* @i)
 !20 = !{i32 2, !"Dwarf Version", i32 4}
@@ -88,7 +88,7 @@ attributes #1 = { nounwind readnone }
 !22 = !{!"clang version 3.5.0 "}
 !23 = !DILocation(line: 8, scope: !13)
 !24 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !25)
-!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3foo")
+!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !26 = !DILocation(line: 0, scope: !17, inlinedAt: !23)
 !27 = !DILocalVariable(name: "x", line: 2, arg: 2, scope: !17, file: !14, type: !9)
 !28 = !DILocation(line: 2, scope: !17, inlinedAt: !23)

Modified: llvm/trunk/test/DebugInfo/X86/memberfnptr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/memberfnptr.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/memberfnptr.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/memberfnptr.ll Sat Apr 23 16:08:00 2016
@@ -30,14 +30,14 @@ declare void @_ZN1A3fooEv(%struct.A*)
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A")
 !5 = !{!6}
-!6 = !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEv", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS1A", type: !7)
+!6 = !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEv", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !4, type: !7)
 !7 = !DISubroutineType(types: !8)
 !8 = !{null, !9}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !10 = !{!11}
 !11 = !DIGlobalVariable(name: "p", line: 5, isLocal: false, isDefinition: true, scope: null, file: !12, type: !13, variable: { i64, i64 }* @p)
 !12 = !DIFile(filename: "memberfnptr.cpp", directory: "")
-!13 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, size: 64, baseType: !7, extraData: !"_ZTS1A")
+!13 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, size: 64, baseType: !7, extraData: !4)
 !14 = !{i32 2, !"Dwarf Version", i32 2}
 !15 = !{i32 2, !"Debug Info Version", i32 3}
 !16 = !{i32 1, !"PIC Level", i32 2}

Modified: llvm/trunk/test/DebugInfo/X86/nodebug_with_debug_loc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/nodebug_with_debug_loc.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/nodebug_with_debug_loc.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/nodebug_with_debug_loc.ll Sat Apr 23 16:08:00 2016
@@ -104,7 +104,7 @@ attributes #3 = { nounwind }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "string", line: 7, size: 32, align: 32, file: !5, elements: !6, identifier: "_ZTS6string")
 !5 = !DIFile(filename: "repro.cpp", directory: "/tmp/dbginfo")
 !6 = !{!7}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "mem", line: 8, size: 32, align: 32, file: !5, scope: !"_ZTS6string", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "mem", line: 8, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
 !8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !9)
 !9 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned)
 !11 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !5, scope: !12, type: !13, variables: !15)
@@ -112,11 +112,11 @@ attributes #3 = { nounwind }
 !13 = !DISubroutineType(types: !14)
 !14 = !{null}
 !15 = !{!16}
-!16 = !DILocalVariable(name: "str2", line: 15, scope: !11, file: !12, type: !"_ZTS6string")
+!16 = !DILocalVariable(name: "str2", line: 15, scope: !11, file: !12, type: !4)
 !17 = distinct !DISubprogram(name: "s2", linkageName: "_Z2s2P6string", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 13, file: !5, scope: !12, type: !18, variables: !21)
 !18 = !DISubroutineType(types: !19)
 !19 = !{null, !20}
-!20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"_ZTS6string")
+!20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !4)
 !21 = !{!22}
 !22 = !DILocalVariable(name: "lhs", line: 13, arg: 1, scope: !17, file: !12, type: !20)
 !23 = !{i32 2, !"Dwarf Version", i32 4}
@@ -129,7 +129,7 @@ attributes #3 = { nounwind }
 !30 = !DILocation(line: 17, scope: !11)
 !31 = !DILocation(line: 18, scope: !11)
 !32 = !{!33, !34, i64 0}
-!33 = !{!"_ZTS6string", !34, i64 0}
+!33 = !{!4, !34, i64 0}
 !34 = !{!"any pointer", !35, i64 0}
 !35 = !{!"omnipotent char", !36, i64 0}
 !36 = !{!"Simple C/C++ TBAA"}

Modified: llvm/trunk/test/DebugInfo/X86/nophysreg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/nophysreg.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/nophysreg.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/nophysreg.ll Sat Apr 23 16:08:00 2016
@@ -142,16 +142,16 @@ attributes #3 = { ssp uwtable }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 128, align: 64, file: !1, elements: !5, identifier: "_ZTS1A")
 !5 = !{!6, !9}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "m1", line: 2, size: 64, align: 64, file: !1, scope: !"_ZTS1A", baseType: !7)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "m1", line: 2, size: 64, align: 64, file: !1, scope: !4, baseType: !7)
 !7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "m2", line: 3, size: 32, align: 32, offset: 64, file: !1, scope: !"_ZTS1A", baseType: !8)
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "m2", line: 3, size: 32, align: 32, offset: 64, file: !1, scope: !4, baseType: !8)
 !11 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f21A", line: 7, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 7, file: !1, scope: !12, type: !13, variables: !15)
 !12 = !DIFile(filename: "test.cpp", directory: "")
 !13 = !DISubroutineType(types: !14)
-!14 = !{null, !"_ZTS1A"}
+!14 = !{null, !4}
 !15 = !{!16}
-!16 = !DILocalVariable(name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !"_ZTS1A")
+!16 = !DILocalVariable(name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !4)
 !17 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 12, file: !1, scope: !12, type: !18, variables: !20)
 !18 = !DISubroutineType(types: !19)
 !19 = !{null}
@@ -163,7 +163,7 @@ attributes #3 = { ssp uwtable }
 !25 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
 !26 = !DILocalVariable(name: "j", line: 19, scope: !24, file: !12, type: !25)
 !27 = !DILocalVariable(name: "I", line: 21, scope: !24, file: !12, type: !25)
-!28 = !DILocalVariable(name: "g", line: 24, scope: !24, file: !12, type: !"_ZTS1A")
+!28 = !DILocalVariable(name: "g", line: 24, scope: !24, file: !12, type: !4)
 !29 = !{i32 2, !"Dwarf Version", i32 2}
 !30 = !{i32 2, !"Debug Info Version", i32 3}
 !31 = !{i32 1, !"PIC Level", i32 2}
@@ -195,7 +195,7 @@ attributes #3 = { ssp uwtable }
 !57 = !DILocation(line: 23, column: 15, scope: !24)
 !58 = !DILocation(line: 23, column: 7, scope: !24)
 !59 = !DILocation(line: 24, column: 9, scope: !24)
-!60 = !DILocalVariable(name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !"_ZTS1A")
+!60 = !DILocalVariable(name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !4)
 !61 = distinct !DILocation(line: 26, column: 7, scope: !24)
 !62 = !DILocation(line: 7, column: 42, scope: !11, inlinedAt: !61)
 !63 = !DILocation(line: 7, column: 48, scope: !11, inlinedAt: !61)

Modified: llvm/trunk/test/DebugInfo/X86/pr19307.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pr19307.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/pr19307.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/pr19307.ll Sat Apr 23 16:08:00 2016
@@ -102,7 +102,7 @@ attributes #2 = { "less-precise-fpmad"="
 !16 = !{null, !17, !17, !19}
 !17 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !18)
 !18 = !DIBasicType(tag: DW_TAG_base_type, name: "long long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
-!19 = !DIDerivedType(tag: DW_TAG_typedef, name: "string", line: 65, file: !20, scope: !10, baseType: !"_ZTSSs")
+!19 = !DIDerivedType(tag: DW_TAG_typedef, name: "string", line: 65, file: !20, scope: !10, baseType: !8)
 !20 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stringfwd.h", directory: "/llvm_cmake_gcc")
 !21 = !{!22, !26, !29, !33, !38, !41}
 !22 = !DIImportedEntity(tag: DW_TAG_imported_module, line: 57, scope: !23, entity: !25)
@@ -111,7 +111,7 @@ attributes #2 = { "less-precise-fpmad"="
 !25 = !DINamespace(name: "__debug", line: 49, file: !24, scope: !10)
 !26 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 66, scope: !10, entity: !27)
 !27 = !DIDerivedType(tag: DW_TAG_typedef, name: "mbstate_t", line: 106, file: !5, baseType: !28)
-!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__mbstate_t", line: 95, file: !5, baseType: !"_ZTS11__mbstate_t")
+!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__mbstate_t", line: 95, file: !5, baseType: !4)
 !29 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 141, scope: !10, entity: !30)
 !30 = !DIDerivedType(tag: DW_TAG_typedef, name: "wint_t", line: 141, file: !31, baseType: !32)
 !31 = !DIFile(filename: "/llvm_cmake_gcc/bin/../lib/clang/3.5.0/include/stddef.h", directory: "/llvm_cmake_gcc")
@@ -124,7 +124,7 @@ attributes #2 = { "less-precise-fpmad"="
 !38 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 43, scope: !34, entity: !39)
 !39 = !DIDerivedType(tag: DW_TAG_typedef, name: "ptrdiff_t", line: 156, file: !11, scope: !10, baseType: !40)
 !40 = !DIBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed)
-!41 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 55, scope: !10, entity: !"_ZTS5lconv")
+!41 = !DIImportedEntity(tag: DW_TAG_imported_declaration, line: 55, scope: !10, entity: !6)
 !42 = !{i32 2, !"Dwarf Version", i32 4}
 !43 = !{i32 2, !"Debug Info Version", i32 3}
 !44 = !{!"clang version 3.5.0 (209308)"}

Modified: llvm/trunk/test/DebugInfo/X86/safestack-byval.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/safestack-byval.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/safestack-byval.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/safestack-byval.ll Sat Apr 23 16:08:00 2016
@@ -63,17 +63,17 @@ attributes #2 = { argmemonly nounwind }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !1, line: 4, size: 3200, align: 32, elements: !5, identifier: "_ZTS1S")
 !5 = !{!6}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !"_ZTS1S", file: !1, line: 5, baseType: !7, size: 3200, align: 32)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !4, file: !1, line: 5, baseType: !7, size: 3200, align: 32)
 !7 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 3200, align: 32, elements: !9)
 !8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !9 = !{!10}
 !10 = !DISubrange(count: 100)
 !12 = distinct !DISubprogram(name: "f", linkageName: "_Z1f1Sm", scope: !1, file: !1, line: 8, type: !13, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !16)
 !13 = !DISubroutineType(types: !14)
-!14 = !{!8, !"_ZTS1S", !15}
+!14 = !{!8, !4, !15}
 !15 = !DIBasicType(name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
 !16 = !{!17, !18}
-!17 = !DILocalVariable(name: "zzz", arg: 1, scope: !12, file: !1, line: 8, type: !"_ZTS1S")
+!17 = !DILocalVariable(name: "zzz", arg: 1, scope: !12, file: !1, line: 8, type: !4)
 !18 = !DILocalVariable(name: "len", arg: 2, scope: !12, file: !1, line: 8, type: !15)
 !19 = !{i32 2, !"Dwarf Version", i32 4}
 !20 = !{i32 2, !"Debug Info Version", i32 3}

Modified: llvm/trunk/test/DebugInfo/X86/sret.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/sret.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/sret.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/sret.ll Sat Apr 23 16:08:00 2016
@@ -267,7 +267,7 @@ attributes #7 = { builtin nounwind }
 !1 = !DIFile(filename: "sret.cpp", directory: "/usr/local/google/home/echristo/tmp")
 !2 = !{}
 !3 = !{!4, !37}
-!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 128, align: 64, file: !1, elements: !5, vtableHolder: !"_ZTS1A", identifier: "_ZTS1A")
+!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 128, align: 64, file: !1, elements: !5, vtableHolder: !4, identifier: "_ZTS1A")
 !5 = !{!6, !13, !14, !19, !25, !29, !33}
 !6 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 64, flags: DIFlagArtificial, file: !1, scope: !7, baseType: !8)
 !7 = !DIFile(filename: "sret.cpp", directory: "/usr/local/google/home/echristo/tmp")
@@ -276,39 +276,39 @@ attributes #7 = { builtin nounwind }
 !10 = !DISubroutineType(types: !11)
 !11 = !{!12}
 !12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "m_int", line: 13, size: 32, align: 32, offset: 64, flags: DIFlagProtected, file: !1, scope: !"_ZTS1A", baseType: !12)
-!14 = !DISubprogram(name: "A", line: 4, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !"_ZTS1A", type: !15)
+!13 = !DIDerivedType(tag: DW_TAG_member, name: "m_int", line: 13, size: 32, align: 32, offset: 64, flags: DIFlagProtected, file: !1, scope: !4, baseType: !12)
+!14 = !DISubprogram(name: "A", line: 4, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !4, type: !15)
 !15 = !DISubroutineType(types: !16)
 !16 = !{null, !17, !12}
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
-!19 = !DISubprogram(name: "A", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !"_ZTS1A", type: !20)
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!19 = !DISubprogram(name: "A", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !4, type: !20)
 !20 = !DISubroutineType(types: !21)
 !21 = !{null, !17, !22}
 !22 = !DIDerivedType(tag: DW_TAG_reference_type, size: 64, align: 64, baseType: !23)
-!23 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS1A")
-!25 = !DISubprogram(name: "operator=", linkageName: "_ZN1AaSERKS_", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !"_ZTS1A", type: !26)
+!23 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !4)
+!25 = !DISubprogram(name: "operator=", linkageName: "_ZN1AaSERKS_", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !4, type: !26)
 !26 = !DISubroutineType(types: !27)
 !27 = !{!22, !17, !22}
-!29 = !DISubprogram(name: "~A", line: 8, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !1, scope: !"_ZTS1A", type: !30, containingType: !"_ZTS1A")
+!29 = !DISubprogram(name: "~A", line: 8, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !1, scope: !4, type: !30, containingType: !4)
 !30 = !DISubroutineType(types: !31)
 !31 = !{null, !17}
-!33 = !DISubprogram(name: "get_int", linkageName: "_ZN1A7get_intEv", line: 10, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !"_ZTS1A", type: !34)
+!33 = !DISubprogram(name: "get_int", linkageName: "_ZN1A7get_intEv", line: 10, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !4, type: !34)
 !34 = !DISubroutineType(types: !35)
 !35 = !{!12, !17}
 !37 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 38, size: 8, align: 8, file: !1, elements: !38, identifier: "_ZTS1B")
 !38 = !{!39, !44}
-!39 = !DISubprogram(name: "B", line: 41, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 41, file: !1, scope: !"_ZTS1B", type: !40)
+!39 = !DISubprogram(name: "B", line: 41, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 41, file: !1, scope: !37, type: !40)
 !40 = !DISubroutineType(types: !41)
 !41 = !{null, !42}
-!42 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B")
-!44 = !DISubprogram(name: "AInstance", linkageName: "_ZN1B9AInstanceEv", line: 43, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 43, file: !1, scope: !"_ZTS1B", type: !45)
+!42 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !37)
+!44 = !DISubprogram(name: "AInstance", linkageName: "_ZN1B9AInstanceEv", line: 43, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 43, file: !1, scope: !37, type: !45)
 !45 = !DISubroutineType(types: !46)
 !46 = !{!4, !42}
-!49 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 18, file: !1, scope: !"_ZTS1A", type: !15, declaration: !14, variables: !2)
-!50 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2ERKS_", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 23, file: !1, scope: !"_ZTS1A", type: !20, declaration: !19, variables: !2)
-!51 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN1AaSERKS_", line: 27, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 28, file: !1, scope: !"_ZTS1A", type: !26, declaration: !25, variables: !2)
-!52 = distinct !DISubprogram(name: "get_int", linkageName: "_ZN1A7get_intEv", line: 33, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 34, file: !1, scope: !"_ZTS1A", type: !34, declaration: !33, variables: !2)
-!53 = distinct !DISubprogram(name: "AInstance", linkageName: "_ZN1B9AInstanceEv", line: 47, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 48, file: !1, scope: !"_ZTS1B", type: !45, declaration: !44, variables: !2)
+!49 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 18, file: !1, scope: !4, type: !15, declaration: !14, variables: !2)
+!50 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2ERKS_", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 23, file: !1, scope: !4, type: !20, declaration: !19, variables: !2)
+!51 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN1AaSERKS_", line: 27, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 28, file: !1, scope: !4, type: !26, declaration: !25, variables: !2)
+!52 = distinct !DISubprogram(name: "get_int", linkageName: "_ZN1A7get_intEv", line: 33, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 34, file: !1, scope: !4, type: !34, declaration: !33, variables: !2)
+!53 = distinct !DISubprogram(name: "AInstance", linkageName: "_ZN1B9AInstanceEv", line: 47, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 48, file: !1, scope: !37, type: !45, declaration: !44, variables: !2)
 !54 = distinct !DISubprogram(name: "main", line: 53, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 54, file: !1, scope: !7, type: !55, variables: !2)
 !55 = !DISubroutineType(types: !56)
 !56 = !{!12, !12, !57}
@@ -316,14 +316,14 @@ attributes #7 = { builtin nounwind }
 !58 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !59)
 !59 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !60)
 !60 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!61 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD0Ev", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !"_ZTS1A", type: !30, declaration: !29, variables: !2)
-!62 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 41, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 41, file: !1, scope: !"_ZTS1B", type: !40, declaration: !39, variables: !2)
-!63 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !"_ZTS1A", type: !30, declaration: !29, variables: !2)
+!61 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD0Ev", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !4, type: !30, declaration: !29, variables: !2)
+!62 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 41, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 41, file: !1, scope: !37, type: !40, declaration: !39, variables: !2)
+!63 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !4, type: !30, declaration: !29, variables: !2)
 !64 = !{i32 2, !"Dwarf Version", i32 4}
 !65 = !{i32 1, !"Debug Info Version", i32 3}
 !66 = !{!"clang version 3.5.0 (trunk 203283) (llvm/trunk 203307)"}
 !67 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !49, type: !68)
-!68 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A")
+!68 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !69 = !DILocation(line: 0, scope: !49)
 !70 = !DILocalVariable(name: "i", line: 16, arg: 2, scope: !49, file: !7, type: !12)
 !71 = !DILocation(line: 16, scope: !49)
@@ -345,7 +345,7 @@ attributes #7 = { builtin nounwind }
 !87 = !DILocation(line: 0, scope: !52)
 !88 = !DILocation(line: 35, scope: !52)
 !89 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !53, type: !90)
-!90 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1B")
+!90 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !37)
 !91 = !DILocation(line: 0, scope: !53)
 !92 = !DILocation(line: 49, scope: !53)
 !93 = !DILocalVariable(name: "a", line: 49, scope: !53, file: !7, type: !4)

Modified: llvm/trunk/test/DebugInfo/X86/sroasplit-4.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/sroasplit-4.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/sroasplit-4.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/sroasplit-4.ll Sat Apr 23 16:08:00 2016
@@ -116,15 +116,15 @@ attributes #3 = { nounwind }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "p", line: 3, size: 128, align: 64, file: !5, elements: !6, identifier: "_ZTS1p")
 !5 = !DIFile(filename: "pr22393.cc", directory: "")
 !6 = !{!7, !9}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "s", line: 4, size: 64, align: 64, file: !5, scope: !"_ZTS1p", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "s", line: 4, size: 64, align: 64, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "t", line: 5, size: 64, align: 64, offset: 64, file: !5, scope: !"_ZTS1p", baseType: !8)
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "t", line: 5, size: 64, align: 64, offset: 64, file: !5, scope: !4, baseType: !8)
 !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "r", line: 8, size: 320, align: 64, file: !5, elements: !11, identifier: "_ZTS1r")
 !11 = !{!12, !14, !15}
-!12 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 9, size: 32, align: 32, file: !5, scope: !"_ZTS1r", baseType: !13)
+!12 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 9, size: 32, align: 32, file: !5, scope: !10, baseType: !13)
 !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!14 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 10, size: 128, align: 64, offset: 64, file: !5, scope: !"_ZTS1r", baseType: !"_ZTS1p")
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "y", line: 11, size: 128, align: 64, offset: 192, file: !5, scope: !"_ZTS1r", baseType: !"_ZTS1p")
+!14 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 10, size: 128, align: 64, offset: 64, file: !5, scope: !10, baseType: !4)
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "y", line: 11, size: 128, align: 64, offset: 192, file: !5, scope: !10, baseType: !4)
 !17 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 18, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 18, file: !5, scope: !18, type: !19, variables: !2)
 !18 = !DIFile(filename: "pr22393.cc", directory: "")
 !19 = !DISubroutineType(types: !20)
@@ -136,10 +136,10 @@ attributes #3 = { nounwind }
 !25 = distinct !DILexicalBlock(line: 19, column: 0, file: !5, scope: !17)
 !26 = !DILocation(line: 19, scope: !17)
 !27 = !DILocation(line: 20, scope: !25)
-!28 = !DILocalVariable(name: "y", line: 21, scope: !17, file: !18, type: !"_ZTS1p")
+!28 = !DILocalVariable(name: "y", line: 21, scope: !17, file: !18, type: !4)
 !29 = !DIExpression()
 !30 = !DILocation(line: 21, scope: !17)
-!31 = !DILocalVariable(name: "r", line: 22, scope: !17, file: !18, type: !"_ZTS1r")
+!31 = !DILocalVariable(name: "r", line: 22, scope: !17, file: !18, type: !10)
 !32 = !DILocation(line: 22, scope: !17)
 !33 = !DILocation(line: 23, scope: !17)
 !34 = !DILocation(line: 24, scope: !17)

Modified: llvm/trunk/test/DebugInfo/X86/template.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/template.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/template.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/template.ll Sat Apr 23 16:08:00 2016
@@ -97,7 +97,7 @@ attributes #0 = { nounwind uwtable "less
 !5 = !{!6}
 !6 = !DITemplateTypeParameter(type: !7)
 !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "nested", line: 2, size: 8, align: 8, file: !1, scope: !"_ZTS6y_implIiE", elements: !2, identifier: "_ZTSN6y_implIiE6nestedE")
+!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "nested", line: 2, size: 8, align: 8, file: !1, scope: !4, elements: !2, identifier: "_ZTSN6y_implIiE6nestedE")
 !10 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 3, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !11, type: !12, variables: !2)
 !11 = !DIFile(filename: "template.cpp", directory: "/tmp/dbginfo")
 !12 = !DISubroutineType(types: !13)
@@ -120,7 +120,7 @@ attributes #0 = { nounwind uwtable "less
 !29 = !DISubroutineType(types: !2)
 !30 = !{!31, !32}
 !31 = !DIGlobalVariable(name: "glbl", line: 3, isLocal: false, isDefinition: true, scope: null, file: !11, type: !7, variable: i32* @glbl)
-!32 = !DIGlobalVariable(name: "n", line: 4, isLocal: false, isDefinition: true, scope: null, file: !11, type: !"_ZTSN6y_implIiE6nestedE", variable: %"struct.y_impl<int>::nested"* @n)
+!32 = !DIGlobalVariable(name: "n", line: 4, isLocal: false, isDefinition: true, scope: null, file: !11, type: !8, variable: %"struct.y_impl<int>::nested"* @n)
 !33 = !{i32 2, !"Dwarf Version", i32 4}
 !34 = !{i32 2, !"Debug Info Version", i32 3}
 !35 = !{!"clang version 3.6.0 (trunk 224394) (llvm/trunk 224384)"}

Modified: llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll Sat Apr 23 16:08:00 2016
@@ -123,18 +123,18 @@
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !9 = !DICompositeType(tag: DW_TAG_structure_type, name: "S2", line: 11, size: 8, align: 8, file: !1, elements: !10, identifier: "_ZTS2S2")
 !10 = !{!11}
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "s2_1", line: 12, size: 8, align: 8, file: !1, scope: !"_ZTS2S2", baseType: !"_ZTS4S2_1IXadL_Z1iEEE")
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "s2_1", line: 12, size: 8, align: 8, file: !1, scope: !9, baseType: !12)
 !12 = !DICompositeType(tag: DW_TAG_structure_type, name: "S2_1<&i>", line: 9, size: 8, align: 8, file: !1, elements: !2, templateParams: !5, identifier: "_ZTS4S2_1IXadL_Z1iEEE")
 !13 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3", line: 22, size: 16, align: 8, file: !1, elements: !14, identifier: "_ZTS2S3")
 !14 = !{!15, !16}
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "s3_1", line: 23, size: 8, align: 8, file: !1, scope: !"_ZTS2S3", baseType: !"_ZTS4S3_1IXadL_Z1iEEE")
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "s3_2", line: 24, size: 8, align: 8, offset: 8, file: !1, scope: !"_ZTS2S3", baseType: !"_ZTS4S3_2")
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "s3_1", line: 23, size: 8, align: 8, file: !1, scope: !13, baseType: !17)
+!16 = !DIDerivedType(tag: DW_TAG_member, name: "s3_2", line: 24, size: 8, align: 8, offset: 8, file: !1, scope: !13, baseType: !18)
 !17 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3_1<&i>", line: 18, size: 8, align: 8, file: !1, elements: !2, templateParams: !5, identifier: "_ZTS4S3_1IXadL_Z1iEEE")
 !18 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3_2", line: 20, size: 8, align: 8, file: !1, elements: !2, identifier: "_ZTS4S3_2")
 !19 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4", line: 34, size: 16, align: 8, file: !1, elements: !20, identifier: "_ZTS2S4")
 !20 = !{!21, !22}
-!21 = !DIDerivedType(tag: DW_TAG_member, name: "s4_1", line: 35, size: 8, align: 8, file: !1, scope: !"_ZTS2S4", baseType: !"_ZTS4S4_1")
-!22 = !DIDerivedType(tag: DW_TAG_member, name: "s4_2", line: 36, size: 8, align: 8, offset: 8, file: !1, scope: !"_ZTS2S4", baseType: !"_ZTS4S4_2IXadL_Z1iEEE")
+!21 = !DIDerivedType(tag: DW_TAG_member, name: "s4_1", line: 35, size: 8, align: 8, file: !1, scope: !19, baseType: !23)
+!22 = !DIDerivedType(tag: DW_TAG_member, name: "s4_2", line: 36, size: 8, align: 8, offset: 8, file: !1, scope: !19, baseType: !24)
 !23 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4_1", line: 29, size: 8, align: 8, file: !1, elements: !2, identifier: "_ZTS4S4_1")
 !24 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4_2<&i>", line: 32, size: 8, align: 8, file: !1, elements: !2, templateParams: !25, identifier: "_ZTS4S4_2IXadL_Z1iEEE")
 !25 = !{!26}
@@ -142,10 +142,10 @@
 !27 = !{!28, !30, !31, !32, !33}
 !28 = !DIGlobalVariable(name: "i", line: 1, isLocal: false, isDefinition: true, scope: null, file: !29, type: !8, variable: i32* @i)
 !29 = !DIFile(filename: "tu.cpp", directory: "/tmp/dbginfo")
-!30 = !DIGlobalVariable(name: "a", line: 6, isLocal: false, isDefinition: true, scope: null, file: !29, type: !"_ZTS2S1IXadL_Z1iEEE", variable: %struct.S1* @a)
-!31 = !DIGlobalVariable(name: "s2", line: 15, isLocal: false, isDefinition: true, scope: null, file: !29, type: !"_ZTS2S2", variable: %struct.S2* @s2)
-!32 = !DIGlobalVariable(name: "s3", line: 27, isLocal: false, isDefinition: true, scope: null, file: !29, type: !"_ZTS2S3", variable: %struct.S3* @s3)
-!33 = !DIGlobalVariable(name: "s4", line: 39, isLocal: false, isDefinition: true, scope: null, file: !29, type: !"_ZTS2S4", variable: %struct.S4* @s4)
+!30 = !DIGlobalVariable(name: "a", line: 6, isLocal: false, isDefinition: true, scope: null, file: !29, type: !4, variable: %struct.S1* @a)
+!31 = !DIGlobalVariable(name: "s2", line: 15, isLocal: false, isDefinition: true, scope: null, file: !29, type: !9, variable: %struct.S2* @s2)
+!32 = !DIGlobalVariable(name: "s3", line: 27, isLocal: false, isDefinition: true, scope: null, file: !29, type: !13, variable: %struct.S3* @s3)
+!33 = !DIGlobalVariable(name: "s4", line: 39, isLocal: false, isDefinition: true, scope: null, file: !29, type: !19, variable: %struct.S4* @s4)
 !34 = !{i32 2, !"Dwarf Version", i32 4}
 !35 = !{i32 1, !"Debug Info Version", i32 3}
 !36 = !{!"clang version 3.5.0 "}

Modified: llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll (original)
+++ llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll Sat Apr 23 16:08:00 2016
@@ -49,16 +49,16 @@ attributes #1 = { nounwind readnone }
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 32, align: 32, file: !1, elements: !5, identifier: "_ZTS1A")
 !5 = !{!6, !8}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 3, size: 32, align: 32, file: !1, scope: !"_ZTS1A", baseType: !7)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 3, size: 32, align: 32, file: !1, scope: !4, baseType: !7)
 !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !"_ZTS1A", type: !9)
+!8 = !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !4, type: !9)
 !9 = !DISubroutineType(types: !10)
 !10 = !{!7, !11}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
-!13 = distinct !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !9, declaration: !8, variables: !14)
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!13 = distinct !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !1, scope: !4, type: !9, declaration: !8, variables: !14)
 !14 = !{!15}
 !15 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !13, type: !16)
-!16 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A")
+!16 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !17 = !{i32 2, !"Dwarf Version", i32 4}
 !18 = !{i32 2, !"Debug Info Version", i32 3}
 !19 = !{!"clang version 3.5.0 (210251)"}

Modified: llvm/trunk/test/Linker/Inputs/type-unique-inheritance-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/type-unique-inheritance-a.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/Inputs/type-unique-inheritance-a.ll (original)
+++ llvm/trunk/test/Linker/Inputs/type-unique-inheritance-a.ll Sat Apr 23 16:08:00 2016
@@ -73,13 +73,13 @@ attributes #1 = { nounwind readnone }
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 3, size: 64, align: 32, file: !5, elements: !6, identifier: "_ZTS1A")
 !5 = !DIFile(filename: "./a.hpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
 !6 = !{!7, !13}
-!7 = !DIDerivedType(tag: DW_TAG_inheritance, flags: DIFlagPrivate, scope: !"_ZTS1A", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_inheritance, flags: DIFlagPrivate, scope: !4, baseType: !8)
 !8 = !DICompositeType(tag: DW_TAG_class_type, name: "Base", line: 3, size: 32, align: 32, file: !9, elements: !10, identifier: "_ZTS4Base")
 !9 = !DIFile(filename: "./b.hpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
 !10 = !{!11}
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !9, scope: !"_ZTS4Base", baseType: !12)
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !9, scope: !8, baseType: !12)
 !12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS1A", baseType: !12)
+!13 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !5, scope: !4, baseType: !12)
 !15 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !16, type: !17, variables: !2)
 !16 = !DIFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
 !17 = !DISubroutineType(types: !18)

Modified: llvm/trunk/test/Linker/Inputs/type-unique-inheritance-b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/type-unique-inheritance-b.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/Inputs/type-unique-inheritance-b.ll (original)
+++ llvm/trunk/test/Linker/Inputs/type-unique-inheritance-b.ll Sat Apr 23 16:08:00 2016
@@ -47,18 +47,18 @@ attributes #3 = { "less-precise-fpmad"="
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 7, size: 128, align: 64, file: !5, elements: !6, identifier: "_ZTS1B")
 !5 = !DIFile(filename: "./b.hpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
 !6 = !{!7, !9}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "bb", line: 8, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS1B", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "bb", line: 8, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 9, size: 64, align: 64, offset: 64, flags: DIFlagPrivate, file: !5, scope: !"_ZTS1B", baseType: !10)
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 9, size: 64, align: 64, offset: 64, flags: DIFlagPrivate, file: !5, scope: !4, baseType: !10)
 !10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !11)
 !11 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 3, size: 64, align: 32, file: !12, elements: !13, identifier: "_ZTS1A")
 !12 = !DIFile(filename: "./a.hpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
 !13 = !{!14, !18}
-!14 = !DIDerivedType(tag: DW_TAG_inheritance, flags: DIFlagPrivate, scope: !"_ZTS1A", baseType: !15)
+!14 = !DIDerivedType(tag: DW_TAG_inheritance, flags: DIFlagPrivate, scope: !11, baseType: !15)
 !15 = !DICompositeType(tag: DW_TAG_class_type, name: "Base", line: 3, size: 32, align: 32, file: !5, elements: !16, identifier: "_ZTS4Base")
 !16 = !{!17}
-!17 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS4Base", baseType: !8)
-!18 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !12, scope: !"_ZTS1A", baseType: !8)
+!17 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !15, baseType: !8)
+!18 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !12, scope: !11, baseType: !8)
 !20 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !21, type: !22, variables: !2)
 !21 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
 !22 = !DISubroutineType(types: !23)

Modified: llvm/trunk/test/Linker/Inputs/type-unique-simple2-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/type-unique-simple2-a.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/Inputs/type-unique-simple2-a.ll (original)
+++ llvm/trunk/test/Linker/Inputs/type-unique-simple2-a.ll Sat Apr 23 16:08:00 2016
@@ -70,10 +70,10 @@ attributes #1 = { nounwind readnone }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Base", line: 1, file: !5, elements: !6, identifier: "_ZTS4Base")
 !5 = !DIFile(filename: "./a.hpp", directory: ".")
 !6 = !{!7, !9}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !"_ZTS4Base", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 3, size: 64, align: 64, offset: 64, file: !5, scope: !"_ZTS4Base", baseType: !10)
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS4Base")
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 3, size: 64, align: 64, offset: 64, file: !5, scope: !4, baseType: !10)
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4)
 !12 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !13, type: !14, variables: !2)
 !13 = !DIFile(filename: "foo.cpp", directory: ".")
 !14 = !DISubroutineType(types: !15)

Modified: llvm/trunk/test/Linker/Inputs/type-unique-simple2-b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/type-unique-simple2-b.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/Inputs/type-unique-simple2-b.ll (original)
+++ llvm/trunk/test/Linker/Inputs/type-unique-simple2-b.ll Sat Apr 23 16:08:00 2016
@@ -43,10 +43,10 @@ attributes #3 = { "less-precise-fpmad"="
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Base", line: 1, file: !5, elements: !6, identifier: "_ZTS4Base")
 !5 = !DIFile(filename: "./a.hpp", directory: ".")
 !6 = !{!7, !9}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !"_ZTS4Base", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 3, size: 64, align: 64, offset: 64, file: !5, scope: !"_ZTS4Base", baseType: !10)
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS4Base")
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 3, size: 64, align: 64, offset: 64, file: !5, scope: !4, baseType: !10)
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4)
 !12 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !13, type: !14, variables: !2)
 !13 = !DIFile(filename: "bar.cpp", directory: ".")
 !14 = !DISubroutineType(types: !15)

Modified: llvm/trunk/test/Linker/type-unique-odr-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-odr-a.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/type-unique-odr-a.ll (original)
+++ llvm/trunk/test/Linker/type-unique-odr-a.ll Sat Apr 23 16:08:00 2016
@@ -90,12 +90,12 @@ attributes #1 = { nounwind readnone }
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 32, align: 32, file: !5, elements: !6, identifier: "_ZTS1A")
 !5 = !DIFile(filename: "type-unique-odr-a.cpp", directory: "")
 !6 = !{!7, !9}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "data", line: 2, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS1A", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "data", line: 2, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !"_ZTS1A", type: !10)
+!9 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !4, type: !10)
 !10 = !DISubroutineType(types: !11)
 !11 = !{null, !12}
-!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
+!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !15 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !16, type: !17, variables: !2)
 !16 = !DIFile(filename: "type-unique-odr-a.cpp", directory: "")
 !17 = !DISubroutineType(types: !18)
@@ -105,6 +105,6 @@ attributes #1 = { nounwind readnone }
 !21 = !{i32 1, !"Debug Info Version", i32 3}
 !22 = !{!"clang version 3.5.0 "}
 !23 = !DILocation(line: 11, scope: !15)
-!24 = !DILocalVariable(name: "a", line: 8, scope: !19, file: !16, type: !"_ZTS1A")
+!24 = !DILocalVariable(name: "a", line: 8, scope: !19, file: !16, type: !4)
 !25 = !DILocation(line: 8, scope: !19)
 !26 = !DILocation(line: 9, scope: !19)

Modified: llvm/trunk/test/Linker/type-unique-odr-b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-odr-b.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/type-unique-odr-b.ll (original)
+++ llvm/trunk/test/Linker/type-unique-odr-b.ll Sat Apr 23 16:08:00 2016
@@ -61,13 +61,13 @@ attributes #1 = { nounwind readnone }
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 32, align: 32, file: !5, elements: !6, identifier: "_ZTS1A")
 !5 = !DIFile(filename: "type-unique-odr-b.cpp", directory: "")
 !6 = !{!7, !9}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "data", line: 3, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS1A", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "data", line: 3, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !"_ZTS1A", type: !10)
+!9 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !4, type: !10)
 !10 = !DISubroutineType(types: !11)
 !11 = !{null, !12}
-!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
-!15 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !5, scope: !"_ZTS1A", type: !10, declaration: !9, variables: !2)
+!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!15 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !5, scope: !4, type: !10, declaration: !9, variables: !2)
 !16 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !17, type: !18, variables: !2)
 !17 = !DIFile(filename: "type-unique-odr-b.cpp", directory: "")
 !18 = !DISubroutineType(types: !19)
@@ -77,7 +77,7 @@ attributes #1 = { nounwind readnone }
 !22 = !{i32 1, !"Debug Info Version", i32 3}
 !23 = !{!"clang version 3.5.0 "}
 !24 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !15, type: !25)
-!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A")
+!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !26 = !DILocation(line: 0, scope: !15)
 !27 = !DILocation(line: 8, scope: !15)
 !28 = !DILocation(line: 11, scope: !16)

Modified: llvm/trunk/test/Linker/type-unique-simple-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-simple-a.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/type-unique-simple-a.ll (original)
+++ llvm/trunk/test/Linker/type-unique-simple-a.ll Sat Apr 23 16:08:00 2016
@@ -75,7 +75,7 @@ attributes #1 = { nounwind readnone }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Base", line: 1, size: 32, align: 32, file: !5, elements: !6, identifier: "_ZTS4Base")
 !5 = !DIFile(filename: "./a.hpp", directory: "/Users/mren/c_testing/type_unique_air/simple")
 !6 = !{!7}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !"_ZTS4Base", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !10 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !11, type: !12, variables: !2)
 !11 = !DIFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple")

Modified: llvm/trunk/test/Linker/type-unique-simple-b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-simple-b.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/type-unique-simple-b.ll (original)
+++ llvm/trunk/test/Linker/type-unique-simple-b.ll Sat Apr 23 16:08:00 2016
@@ -45,7 +45,7 @@ attributes #3 = { "less-precise-fpmad"="
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Base", line: 1, size: 32, align: 32, file: !5, elements: !6, identifier: "_ZTS4Base")
 !5 = !DIFile(filename: "./a.hpp", directory: "/Users/mren/c_testing/type_unique_air/simple")
 !6 = !{!7}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !"_ZTS4Base", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !10 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !11, type: !12, variables: !2)
 !11 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple")

Modified: llvm/trunk/test/Linker/type-unique-simple2-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-simple2-a.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/type-unique-simple2-a.ll (original)
+++ llvm/trunk/test/Linker/type-unique-simple2-a.ll Sat Apr 23 16:08:00 2016
@@ -85,7 +85,7 @@ attributes #4 = { nounwind readnone }
 !1 = !DIFile(filename: "<unknown>", directory: "")
 !2 = !{}
 !3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !"_ZTS1A", identifier: "_ZTS1A")
+!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !4, identifier: "_ZTS1A")
 !5 = !DIFile(filename: "./ab.h", directory: "")
 !6 = !{!7, !14, !19}
 !7 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 64, flags: DIFlagArtificial, file: !5, scope: !8, baseType: !9)
@@ -95,11 +95,11 @@ attributes #4 = { nounwind readnone }
 !11 = !DISubroutineType(types: !12)
 !12 = !{!13}
 !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!14 = !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 4, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !"_ZTS1A", type: !15, containingType: !"_ZTS1A")
+!14 = !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 4, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !4, type: !15, containingType: !4)
 !15 = !DISubroutineType(types: !16)
 !16 = !{null, !17}
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
-!19 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 5, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !"_ZTS1A", type: !20, containingType: !"_ZTS1A")
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!19 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 5, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !4, type: !20, containingType: !4)
 !20 = !DISubroutineType(types: !21)
 !21 = !{!22, !17}
 !22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !23)
@@ -109,15 +109,15 @@ attributes #4 = { nounwind readnone }
 !28 = !DIFile(filename: "a.cpp", directory: "")
 !29 = !DISubroutineType(types: !30)
 !30 = !{!23}
-!31 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !15, declaration: !32, variables: !2)
-!32 = !DISubprogram(name: "A", isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !"_ZTS1A", type: !15)
-!34 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !15, declaration: !32, variables: !2)
+!31 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !4, type: !15, declaration: !32, variables: !2)
+!32 = !DISubprogram(name: "A", isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !4, type: !15)
+!34 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !4, type: !15, declaration: !32, variables: !2)
 !35 = !{i32 2, !"Dwarf Version", i32 2}
 !36 = !{i32 1, !"Debug Info Version", i32 3}
 !37 = !{!"clang version 3.5 "}
 !38 = !DILocation(line: 3, scope: !27)
 !39 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !31, type: !40)
-!40 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A")
+!40 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !41 = !DILocation(line: 0, scope: !31)
 !42 = !DILocation(line: 2, scope: !43)
 !43 = !DILexicalBlockFile(discriminator: 0, file: !5, scope: !31)

Modified: llvm/trunk/test/Linker/type-unique-simple2-b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-simple2-b.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/type-unique-simple2-b.ll (original)
+++ llvm/trunk/test/Linker/type-unique-simple2-b.ll Sat Apr 23 16:08:00 2016
@@ -51,7 +51,7 @@ attributes #1 = { nounwind readnone }
 !1 = !DIFile(filename: "<unknown>", directory: "")
 !2 = !{}
 !3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !"_ZTS1A", identifier: "_ZTS1A")
+!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !4, identifier: "_ZTS1A")
 !5 = !DIFile(filename: "./ab.h", directory: "")
 !6 = !{!7, !14, !19}
 !7 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 64, flags: DIFlagArtificial, file: !5, scope: !8, baseType: !9)
@@ -61,23 +61,23 @@ attributes #1 = { nounwind readnone }
 !11 = !DISubroutineType(types: !12)
 !12 = !{!13}
 !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!14 = !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 4, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !"_ZTS1A", type: !15, containingType: !"_ZTS1A")
+!14 = !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 4, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !4, type: !15, containingType: !4)
 !15 = !DISubroutineType(types: !16)
 !16 = !{null, !17}
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
-!19 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 5, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !"_ZTS1A", type: !20, containingType: !"_ZTS1A")
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!19 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 5, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !4, type: !20, containingType: !4)
 !20 = !DISubroutineType(types: !21)
 !21 = !{!22, !17}
 !22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !23)
 !23 = !DIDerivedType(tag: DW_TAG_typedef, name: "foo_t", line: 1, file: !5, baseType: !13)
-!26 = distinct !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !27, scope: !"_ZTS1A", type: !15, declaration: !14, variables: !2)
+!26 = distinct !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !27, scope: !4, type: !15, declaration: !14, variables: !2)
 !27 = !DIFile(filename: "b.cpp", directory: "")
-!28 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !27, scope: !"_ZTS1A", type: !20, declaration: !19, variables: !2)
+!28 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !27, scope: !4, type: !20, declaration: !19, variables: !2)
 !29 = !{i32 2, !"Dwarf Version", i32 2}
 !30 = !{i32 1, !"Debug Info Version", i32 3}
 !31 = !{!"clang version 3.5 "}
 !32 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !26, type: !33)
-!33 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A")
+!33 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
 !34 = !DILocation(line: 0, scope: !26)
 !35 = !DILocation(line: 2, scope: !26)
 !36 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !33)

Modified: llvm/trunk/test/Linker/type-unique-type-array-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-type-array-a.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/type-unique-type-array-a.ll (original)
+++ llvm/trunk/test/Linker/type-unique-type-array-a.ll Sat Apr 23 16:08:00 2016
@@ -98,31 +98,31 @@ attributes #3 = { nounwind }
 !3 = !{!4, !10}
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 5, file: !1, elements: !5, identifier: "_ZTS1A")
 !5 = !{!6}
-!6 = !DISubprogram(name: "testA", linkageName: "_ZN1A5testAE2SA", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !"_ZTS1A", type: !7)
+!6 = !DISubprogram(name: "testA", linkageName: "_ZN1A5testAE2SA", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !4, type: !7)
 !7 = !DISubroutineType(types: !8)
-!8 = !{null, !9, !"_ZTS2SA"}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
+!8 = !{null, !9, !10}
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "SA", line: 1, size: 32, align: 32, file: !1, elements: !11, identifier: "_ZTS2SA")
 !11 = !{!12}
-!12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !"_ZTS2SA", baseType: !13)
+!12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !10, baseType: !13)
 !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !15 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topAP1A2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !1, scope: !16, type: !17, variables: !2)
 !16 = !DIFile(filename: "a.cpp", directory: "/Users/manmanren/test-Nov/type_unique/rdar_di_array")
 !17 = !DISubroutineType(types: !18)
-!18 = !{null, !19, !"_ZTS2SA"}
-!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A")
-!20 = distinct !DISubprogram(name: "testA", linkageName: "_ZN1A5testAE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !"_ZTS1A", type: !7, declaration: !6, variables: !2)
+!18 = !{null, !19, !10}
+!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4)
+!20 = distinct !DISubprogram(name: "testA", linkageName: "_ZN1A5testAE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !4, type: !7, declaration: !6, variables: !2)
 !21 = !{i32 2, !"Dwarf Version", i32 2}
 !22 = !{i32 2, !"Debug Info Version", i32 3}
 !23 = !{!"clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)"}
 !24 = !DILocalVariable(name: "a", line: 11, arg: 1, scope: !15, file: !16, type: !19)
 !25 = !DILocation(line: 11, column: 14, scope: !15)
-!26 = !DILocalVariable(name: "sa", line: 11, arg: 2, scope: !15, file: !16, type: !"_ZTS2SA")
+!26 = !DILocalVariable(name: "sa", line: 11, arg: 2, scope: !15, file: !16, type: !10)
 !27 = !DILocation(line: 11, column: 20, scope: !15)
 !28 = !DILocation(line: 12, column: 3, scope: !15)
 !29 = !DILocation(line: 13, column: 1, scope: !15)
 !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !20, type: !19)
 !31 = !DILocation(line: 0, scope: !20)
-!32 = !DILocalVariable(name: "a", line: 7, arg: 2, scope: !20, file: !16, type: !"_ZTS2SA")
+!32 = !DILocalVariable(name: "a", line: 7, arg: 2, scope: !20, file: !16, type: !10)
 !33 = !DILocation(line: 7, column: 17, scope: !20)
 !34 = !DILocation(line: 8, column: 3, scope: !20)

Modified: llvm/trunk/test/Linker/type-unique-type-array-b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-type-array-b.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Linker/type-unique-type-array-b.ll (original)
+++ llvm/trunk/test/Linker/type-unique-type-array-b.ll Sat Apr 23 16:08:00 2016
@@ -77,31 +77,31 @@ attributes #3 = { nounwind }
 !3 = !{!4, !10}
 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 5, file: !1, elements: !5, identifier: "_ZTS1B")
 !5 = !{!6}
-!6 = !DISubprogram(name: "testB", linkageName: "_ZN1B5testBE2SA", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !"_ZTS1B", type: !7)
+!6 = !DISubprogram(name: "testB", linkageName: "_ZN1B5testBE2SA", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !4, type: !7)
 !7 = !DISubroutineType(types: !8)
-!8 = !{null, !9, !"_ZTS2SA"}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B")
+!8 = !{null, !9, !10}
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
 !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "SA", line: 1, size: 32, align: 32, file: !1, elements: !11, identifier: "_ZTS2SA")
 !11 = !{!12}
-!12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !"_ZTS2SA", baseType: !13)
+!12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !10, baseType: !13)
 !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !15 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topBP1B2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !1, scope: !16, type: !17, variables: !2)
 !16 = !DIFile(filename: "b.cpp", directory: "/Users/manmanren/test-Nov/type_unique/rdar_di_array")
 !17 = !DISubroutineType(types: !18)
-!18 = !{null, !19, !"_ZTS2SA"}
-!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1B")
-!20 = distinct !DISubprogram(name: "testB", linkageName: "_ZN1B5testBE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !"_ZTS1B", type: !7, declaration: !6, variables: !2)
+!18 = !{null, !19, !10}
+!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4)
+!20 = distinct !DISubprogram(name: "testB", linkageName: "_ZN1B5testBE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !4, type: !7, declaration: !6, variables: !2)
 !21 = !{i32 2, !"Dwarf Version", i32 2}
 !22 = !{i32 2, !"Debug Info Version", i32 3}
 !23 = !{!"clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)"}
 !24 = !DILocalVariable(name: "b", line: 11, arg: 1, scope: !15, file: !16, type: !19)
 !25 = !DILocation(line: 11, column: 14, scope: !15)
-!26 = !DILocalVariable(name: "sa", line: 11, arg: 2, scope: !15, file: !16, type: !"_ZTS2SA")
+!26 = !DILocalVariable(name: "sa", line: 11, arg: 2, scope: !15, file: !16, type: !10)
 !27 = !DILocation(line: 11, column: 20, scope: !15)
 !28 = !DILocation(line: 12, column: 3, scope: !15)
 !29 = !DILocation(line: 13, column: 1, scope: !15)
 !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !20, type: !19)
 !31 = !DILocation(line: 0, scope: !20)
-!32 = !DILocalVariable(name: "sa", line: 7, arg: 2, scope: !20, file: !16, type: !"_ZTS2SA")
+!32 = !DILocalVariable(name: "sa", line: 7, arg: 2, scope: !20, file: !16, type: !10)
 !33 = !DILocation(line: 7, column: 17, scope: !20)
 !34 = !DILocation(line: 8, column: 3, scope: !20)

Modified: llvm/trunk/test/Transforms/GCOVProfiling/linezero.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GCOVProfiling/linezero.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GCOVProfiling/linezero.ll (original)
+++ llvm/trunk/test/Transforms/GCOVProfiling/linezero.ll Sat Apr 23 16:08:00 2016
@@ -100,13 +100,13 @@ attributes #3 = { noreturn nounwind }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "vector", line: 21, size: 8, align: 8, file: !5, elements: !6, identifier: "_ZTS6vector")
 !5 = !DIFile(filename: "linezero.cc", directory: "PATTERN")
 !6 = !{!7, !13}
-!7 = !DISubprogram(name: "begin", linkageName: "_ZN6vector5beginEv", line: 25, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !5, scope: !"_ZTS6vector", type: !8)
+!7 = !DISubprogram(name: "begin", linkageName: "_ZN6vector5beginEv", line: 25, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !5, scope: !4, type: !8)
 !8 = !DISubroutineType(types: !9)
 !9 = !{!10, !12}
 !10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !11)
 !11 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS6vector")
-!13 = !DISubprogram(name: "end", linkageName: "_ZN6vector3endEv", line: 26, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 26, file: !5, scope: !"_ZTS6vector", type: !8)
+!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
+!13 = !DISubprogram(name: "end", linkageName: "_ZN6vector3endEv", line: 26, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 26, file: !5, scope: !4, type: !8)
 !15 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 50, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 50, file: !5, scope: !16, type: !17, variables: !2)
 !16 = !DIFile(filename: "linezero.cc", directory: "PATTERN")
 !17 = !DISubroutineType(types: !18)
@@ -121,7 +121,7 @@ attributes #3 = { noreturn nounwind }
 !26 = !{!"clang version 3.5.0 (trunk 209871)"}
 !27 = !DILocalVariable(name: "__range", flags: DIFlagArtificial, scope: !28, type: !29)
 !28 = distinct !DILexicalBlock(line: 51, column: 0, file: !5, scope: !15)
-!29 = !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: !"_ZTS6vector")
+!29 = !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: !4)
 !30 = !DILocation(line: 0, scope: !28)
 !31 = !DILocation(line: 51, scope: !28)
 !32 = !DILocalVariable(name: "__begin", flags: DIFlagArtificial, scope: !28, type: !10)

Modified: llvm/trunk/test/Transforms/Inline/alloca-dbgdeclare.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/alloca-dbgdeclare.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/alloca-dbgdeclare.ll (original)
+++ llvm/trunk/test/Transforms/Inline/alloca-dbgdeclare.ll Sat Apr 23 16:08:00 2016
@@ -89,9 +89,9 @@ attributes #3 = { noreturn nounwind }
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 192, align: 64, file: !5, elements: !6, identifier: "_ZTS1A")
 !5 = !DIFile(filename: "test.cpp", directory: "")
 !6 = !{!7, !9}
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "arg0", line: 2, size: 32, align: 32, file: !5, scope: !"_ZTS1A", baseType: !8)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "arg0", line: 2, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "arg1", line: 3, size: 128, align: 64, offset: 64, file: !5, scope: !"_ZTS1A", baseType: !10)
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "arg1", line: 3, size: 128, align: 64, offset: 64, file: !5, scope: !4, baseType: !10)
 !10 = !DICompositeType(tag: DW_TAG_array_type, size: 128, align: 64, baseType: !11, elements: !12)
 !11 = !DIBasicType(tag: DW_TAG_base_type, name: "double", size: 64, align: 64, encoding: DW_ATE_float)
 !12 = !{!13}
@@ -99,16 +99,16 @@ attributes #3 = { noreturn nounwind }
 !15 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn31A", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !5, scope: !16, type: !17, variables: !19)
 !16 = !DIFile(filename: "test.cpp", directory: "")
 !17 = !DISubroutineType(types: !18)
-!18 = !{null, !"_ZTS1A"}
+!18 = !{null, !4}
 !19 = !{!20}
-!20 = !DILocalVariable(name: "p1", line: 6, arg: 1, scope: !15, file: !16, type: !"_ZTS1A")
+!20 = !DILocalVariable(name: "p1", line: 6, arg: 1, scope: !15, file: !16, type: !4)
 !21 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 11, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 11, file: !5, scope: !16, type: !22, variables: !2)
 !22 = !DISubroutineType(types: !23)
 !23 = !{null}
 !24 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 13, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 13, file: !5, scope: !16, type: !22, variables: !2)
 !25 = !{!26, !27}
-!26 = !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !"_ZTS1A", variable: %struct.A* @a)
-!27 = !DIGlobalVariable(name: "b", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !"_ZTS1A", variable: %struct.A* @b)
+!26 = !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !4, variable: %struct.A* @a)
+!27 = !DIGlobalVariable(name: "b", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !4, variable: %struct.A* @b)
 !28 = !{i32 2, !"Dwarf Version", i32 4}
 !29 = !{i32 2, !"Debug Info Version", i32 3}
 !30 = !{!"clang version 3.7.0 (trunk 227480) (llvm/trunk 227517)"}
@@ -117,7 +117,7 @@ attributes #3 = { noreturn nounwind }
 !33 = !DILocation(line: 7, scope: !34)
 !34 = distinct !DILexicalBlock(line: 7, column: 0, file: !5, scope: !15)
 !35 = !{!36, !37, i64 0}
-!36 = !{!"_ZTS1A", !37, i64 0, !38, i64 8}
+!36 = !{!4, !37, i64 0, !38, i64 8}
 !37 = !{!"int", !38, i64 0}
 !38 = !{!"omnipotent char", !39, i64 0}
 !39 = !{!"Simple C/C++ TBAA"}
@@ -127,7 +127,7 @@ attributes #3 = { noreturn nounwind }
 !43 = !{!37, !37, i64 0}
 !44 = !{!38, !38, i64 0}
 !45 = !DILocation(line: 9, scope: !15)
-!46 = !DILocalVariable(name: "p1", line: 6, arg: 1, scope: !15, file: !16, type: !"_ZTS1A")
+!46 = !DILocalVariable(name: "p1", line: 6, arg: 1, scope: !15, file: !16, type: !4)
 !47 = distinct !DILocation(line: 11, scope: !21)
 !48 = !DIExpression(DW_OP_bit_piece, 32, 160)
 !49 = !DILocation(line: 6, scope: !15, inlinedAt: !47)

Modified: llvm/trunk/test/Transforms/SafeStack/debug-loc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SafeStack/debug-loc.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SafeStack/debug-loc.ll (original)
+++ llvm/trunk/test/Transforms/SafeStack/debug-loc.ll Sat Apr 23 16:08:00 2016
@@ -61,21 +61,21 @@ attributes #2 = { "disable-tail-calls"="
 !3 = !{!4}
 !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !1, line: 4, size: 800, align: 8, elements: !5, identifier: "_ZTS1S")
 !5 = !{!6}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !"_ZTS1S", file: !1, line: 5, baseType: !7, size: 800, align: 8)
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !4, file: !1, line: 5, baseType: !7, size: 800, align: 8)
 !7 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 800, align: 8, elements: !9)
 !8 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
 !9 = !{!10}
 !10 = !DISubrange(count: 100)
 !12 = distinct !DISubprogram(name: "f", linkageName: "_Z1f1S", scope: !1, file: !1, line: 10, type: !13, isLocal: false, isDefinition: true, scopeLine: 10, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
 !13 = !DISubroutineType(types: !14)
-!14 = !{null, !"_ZTS1S"}
+!14 = !{null, !4}
 !15 = !{i32 2, !"Dwarf Version", i32 4}
 !16 = !{i32 2, !"Debug Info Version", i32 3}
 !17 = !{!"clang version 3.8.0 (trunk 254019) (llvm/trunk 254036)"}
-!18 = !DILocalVariable(name: "zzz", arg: 1, scope: !12, file: !1, line: 10, type: !"_ZTS1S")
+!18 = !DILocalVariable(name: "zzz", arg: 1, scope: !12, file: !1, line: 10, type: !4)
 !19 = !DIExpression()
 !20 = !DILocation(line: 10, column: 10, scope: !12)
-!21 = !DILocalVariable(name: "xxx", scope: !12, file: !1, line: 11, type: !"_ZTS1S")
+!21 = !DILocalVariable(name: "xxx", scope: !12, file: !1, line: 11, type: !4)
 !22 = !DILocation(line: 11, column: 5, scope: !12)
 !23 = !DILocation(line: 12, column: 3, scope: !12)
 !24 = !DILocation(line: 13, column: 3, scope: !12)

Modified: llvm/trunk/test/Transforms/Util/split-bit-piece.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Util/split-bit-piece.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Util/split-bit-piece.ll (original)
+++ llvm/trunk/test/Transforms/Util/split-bit-piece.ll Sat Apr 23 16:08:00 2016
@@ -40,6 +40,6 @@ attributes #0 = { nounwind readnone }
 !8 = !{!"clang version 3.8.0 (trunk 256979) (llvm/trunk 257107)"}
 !9 = !DILocalVariable(name: "v1", scope: !10, file: !4, line: 136, type: !5)
 !10 = distinct !DILexicalBlock(scope: !11, file: !4, line: 136, column: 5)
-!11 = distinct !DISubprogram(name: "SetHistorySize", linkageName: "_ZN6__tsan9FastState14SetHistorySizeEi", scope: !"_ZTSN6__tsan9FastStateE", file: !4, line: 135, isLocal: false, isDefinition: true, scopeLine: 135, flags: DIFlagPrototyped, isOptimized: false, unit: !0)
+!11 = distinct !DISubprogram(name: "SetHistorySize", linkageName: "_ZN6__tsan9FastState14SetHistorySizeEi", scope: !3, file: !4, line: 135, isLocal: false, isDefinition: true, scopeLine: 135, flags: DIFlagPrototyped, isOptimized: false, unit: !0)
 !12 = !DIExpression()
 !13 = !DILocation(line: 136, column: 5, scope: !10)

Modified: llvm/trunk/test/Verifier/dbg-typerefs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/dbg-typerefs.ll?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/dbg-typerefs.ll (original)
+++ llvm/trunk/test/Verifier/dbg-typerefs.ll Sat Apr 23 16:08:00 2016
@@ -4,13 +4,12 @@
 !llvm.module.flags = !{!0}
 !0 = !{i32 2, !"Debug Info Version", i32 3}
 
-; Make a bunch of type references.  Note that !4 references !"0.bad" (instead
-; of !"4.bad") to test error ordering.
+; Make a bunch of type references.
 !typerefs = !{!1, !2, !3, !4}
-!1 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"1.good")
+!1 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !8)
 !2 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"2.bad")
-!3 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"3.good")
-!4 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"0.bad")
+!3 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !9)
+!4 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"4.bad")
 
 ; Add a minimal compile unit to resolve some of the type references.
 !llvm.dbg.cu = !{!5}
@@ -21,12 +20,12 @@
 !9 = !DICompositeType(tag: DW_TAG_structure_type, identifier: "3.good")
 
 ; CHECK:      assembly parsed, but does not verify
-; CHECK-NEXT: unresolved type ref
-; CHECK-NEXT: !"0.bad"
+; CHECK-NEXT: invalid base type
 ; CHECK-NEXT: !DIDerivedType(tag: DW_TAG_pointer_type
-; CHECK-SAME:                baseType: !"0.bad"
-; CHECK-NEXT: unresolved type ref
+; CHECK-SAME:                baseType: !"2.bad"
 ; CHECK-NEXT: !"2.bad"
+; CHECK-NEXT: invalid base type
 ; CHECK-NEXT: !DIDerivedType(tag: DW_TAG_pointer_type
-; CHECK-SAME:                baseType: !"2.bad"
-; CHECK-NOT:  unresolved
+; CHECK-SAME:                baseType: !"4.bad"
+; CHECK-NEXT: !"4.bad"
+; CHECK-NOT:  invalid

Modified: llvm/trunk/tools/opt/BreakpointPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/BreakpointPrinter.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/tools/opt/BreakpointPrinter.cpp (original)
+++ llvm/trunk/tools/opt/BreakpointPrinter.cpp Sat Apr 23 16:08:00 2016
@@ -25,7 +25,6 @@ namespace {
 struct BreakpointPrinter : public ModulePass {
   raw_ostream &Out;
   static char ID;
-  DITypeIdentifierMap TypeIdentifierMap;
 
   BreakpointPrinter(raw_ostream &out) : ModulePass(ID), Out(out) {}
 
@@ -37,16 +36,13 @@ struct BreakpointPrinter : public Module
       }
     } else if (auto *TY = dyn_cast<DIType>(Context)) {
       if (!TY->getName().empty()) {
-        getContextName(TY->getScope().resolve(TypeIdentifierMap), N);
+        getContextName(TY->getScope().resolve(), N);
         N = N + TY->getName().str() + "::";
       }
     }
   }
 
   bool runOnModule(Module &M) override {
-    TypeIdentifierMap.clear();
-    TypeIdentifierMap = generateDITypeIdentifierMap(M);
-
     StringSet<> Processed;
     if (NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.sp"))
       for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
@@ -54,7 +50,7 @@ struct BreakpointPrinter : public Module
         auto *SP = cast_or_null<DISubprogram>(NMD->getOperand(i));
         if (!SP)
           continue;
-        getContextName(SP->getScope().resolve(TypeIdentifierMap), Name);
+        getContextName(SP->getScope().resolve(), Name);
         Name = Name + SP->getDisplayName().str();
         if (!Name.empty() && Processed.insert(Name).second) {
           Out << Name << "\n";

Modified: llvm/trunk/unittests/IR/MetadataTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/MetadataTest.cpp?rev=267296&r1=267295&r2=267296&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/MetadataTest.cpp (original)
+++ llvm/trunk/unittests/IR/MetadataTest.cpp Sat Apr 23 16:08:00 2016
@@ -87,7 +87,6 @@ protected:
                                      nullptr, false, false, 0, nullptr,
                                      0, 0, 0, false, nullptr);
   }
-  DIScopeRef getSubprogramRef() { return getSubprogram()->getRef(); }
   DIFile *getFile() {
     return DIFile::getDistinct(Context, "file.c", "/path/to/dir");
   }
@@ -97,15 +96,13 @@ protected:
                                       getTuple(), getTuple(), getTuple(),
                                       getTuple(), getTuple(), 0);
   }
-  DITypeRef getBasicType(StringRef Name) {
-    return DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, Name)
-        ->getRef();
+  DIType *getBasicType(StringRef Name) {
+    return DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, Name);
   }
-  DITypeRef getDerivedType() {
+  DIType *getDerivedType() {
     return DIDerivedType::getDistinct(Context, dwarf::DW_TAG_pointer_type, "",
                                       nullptr, 0, nullptr,
-                                      getBasicType("basictype"), 1, 2, 0, 0)
-        ->getRef();
+                                      getBasicType("basictype"), 1, 2, 0, 0);
   }
   Constant *getConstant() {
     return ConstantInt::get(Type::getInt32Ty(Context), Counter++);
@@ -113,11 +110,10 @@ protected:
   ConstantAsMetadata *getConstantAsMetadata() {
     return ConstantAsMetadata::get(getConstant());
   }
-  DITypeRef getCompositeType() {
+  DIType *getCompositeType() {
     return DICompositeType::getDistinct(
-               Context, dwarf::DW_TAG_structure_type, "", nullptr, 0, nullptr,
-               nullptr, 32, 32, 0, 0, nullptr, 0, nullptr, nullptr, "")
-        ->getRef();
+        Context, dwarf::DW_TAG_structure_type, "", nullptr, 0, nullptr, nullptr,
+        32, 32, 0, 0, nullptr, 0, nullptr, nullptr, "");
   }
   Function *getFunction(StringRef Name) {
     return cast<Function>(M.getOrInsertFunction(
@@ -992,8 +988,8 @@ typedef MetadataTest DIDerivedTypeTest;
 
 TEST_F(DIDerivedTypeTest, get) {
   DIFile *File = getFile();
-  DIScopeRef Scope = getSubprogramRef();
-  DITypeRef BaseType = getBasicType("basic");
+  DIScope *Scope = getSubprogram();
+  DIType *BaseType = getBasicType("basic");
   MDTuple *ExtraData = getTuple();
 
   auto *N = DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "something",
@@ -1026,7 +1022,7 @@ TEST_F(DIDerivedTypeTest, get) {
                                   "something", File, 2, Scope, BaseType, 2, 3,
                                   4, 5, ExtraData));
   EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
-                                  "something", File, 1, getSubprogramRef(),
+                                  "something", File, 1, getSubprogram(),
                                   BaseType, 2, 3, 4, 5, ExtraData));
   EXPECT_NE(N, DIDerivedType::get(
                    Context, dwarf::DW_TAG_pointer_type, "something", File, 1,
@@ -1053,8 +1049,8 @@ TEST_F(DIDerivedTypeTest, get) {
 
 TEST_F(DIDerivedTypeTest, getWithLargeValues) {
   DIFile *File = getFile();
-  DIScopeRef Scope = getSubprogramRef();
-  DITypeRef BaseType = getBasicType("basic");
+  DIScope *Scope = getSubprogram();
+  DIType *BaseType = getBasicType("basic");
   MDTuple *ExtraData = getTuple();
 
   auto *N = DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "something",
@@ -1072,15 +1068,15 @@ TEST_F(DICompositeTypeTest, get) {
   StringRef Name = "some name";
   DIFile *File = getFile();
   unsigned Line = 1;
-  DIScopeRef Scope = getSubprogramRef();
-  DITypeRef BaseType = getCompositeType();
+  DIScope *Scope = getSubprogram();
+  DIType *BaseType = getCompositeType();
   uint64_t SizeInBits = 2;
   uint64_t AlignInBits = 3;
   uint64_t OffsetInBits = 4;
   unsigned Flags = 5;
   MDTuple *Elements = getTuple();
   unsigned RuntimeLang = 6;
-  DITypeRef VTableHolder = getCompositeType();
+  DIType *VTableHolder = getCompositeType();
   MDTuple *TemplateParams = getTuple();
   StringRef Identifier = "some id";
 
@@ -1126,7 +1122,7 @@ TEST_F(DICompositeTypeTest, get) {
                                     OffsetInBits, Flags, Elements, RuntimeLang,
                                     VTableHolder, TemplateParams, Identifier));
   EXPECT_NE(N, DICompositeType::get(
-                   Context, Tag, Name, File, Line, getSubprogramRef(), BaseType,
+                   Context, Tag, Name, File, Line, getSubprogram(), BaseType,
                    SizeInBits, AlignInBits, OffsetInBits, Flags, Elements,
                    RuntimeLang, VTableHolder, TemplateParams, Identifier));
   EXPECT_NE(N, DICompositeType::get(
@@ -1191,15 +1187,15 @@ TEST_F(DICompositeTypeTest, getWithLarge
   StringRef Name = "some name";
   DIFile *File = getFile();
   unsigned Line = 1;
-  DIScopeRef Scope = getSubprogramRef();
-  DITypeRef BaseType = getCompositeType();
+  DIScope *Scope = getSubprogram();
+  DIType *BaseType = getCompositeType();
   uint64_t SizeInBits = UINT64_MAX;
   uint64_t AlignInBits = UINT64_MAX - 1;
   uint64_t OffsetInBits = UINT64_MAX - 2;
   unsigned Flags = 5;
   MDTuple *Elements = getTuple();
   unsigned RuntimeLang = 6;
-  DITypeRef VTableHolder = getCompositeType();
+  DIType *VTableHolder = getCompositeType();
   MDTuple *TemplateParams = getTuple();
   StringRef Identifier = "some id";
 
@@ -1217,8 +1213,8 @@ TEST_F(DICompositeTypeTest, replaceOpera
   StringRef Name = "some name";
   DIFile *File = getFile();
   unsigned Line = 1;
-  DIScopeRef Scope = getSubprogramRef();
-  DITypeRef BaseType = getCompositeType();
+  DIScope *Scope = getSubprogram();
+  DIType *BaseType = getCompositeType();
   uint64_t SizeInBits = 2;
   uint64_t AlignInBits = 3;
   uint64_t OffsetInBits = 4;
@@ -1237,7 +1233,7 @@ TEST_F(DICompositeTypeTest, replaceOpera
   N->replaceElements(nullptr);
   EXPECT_EQ(nullptr, N->getElements().get());
 
-  DITypeRef VTableHolder = getCompositeType();
+  DIType *VTableHolder = getCompositeType();
   EXPECT_EQ(nullptr, N->getVTableHolder());
   N->replaceVTableHolder(VTableHolder);
   EXPECT_EQ(VTableHolder, N->getVTableHolder());
@@ -1399,7 +1395,7 @@ TEST_F(DICompileUnitTest, replaceArrays)
 typedef MetadataTest DISubprogramTest;
 
 TEST_F(DISubprogramTest, get) {
-  DIScopeRef Scope = getCompositeType();
+  DIScope *Scope = getCompositeType();
   StringRef Name = "name";
   StringRef LinkageName = "linkage";
   DIFile *File = getFile();
@@ -1408,7 +1404,7 @@ TEST_F(DISubprogramTest, get) {
   bool IsLocalToUnit = false;
   bool IsDefinition = true;
   unsigned ScopeLine = 3;
-  DITypeRef ContainingType = getCompositeType();
+  DIType *ContainingType = getCompositeType();
   unsigned Virtuality = 2;
   unsigned VirtualIndex = 5;
   unsigned Flags = 6;
@@ -1687,7 +1683,7 @@ typedef MetadataTest DITemplateTypeParam
 
 TEST_F(DITemplateTypeParameterTest, get) {
   StringRef Name = "template";
-  DITypeRef Type = getBasicType("basic");
+  DIType *Type = getBasicType("basic");
 
   auto *N = DITemplateTypeParameter::get(Context, Name, Type);
 
@@ -1709,7 +1705,7 @@ typedef MetadataTest DITemplateValuePara
 TEST_F(DITemplateValueParameterTest, get) {
   unsigned Tag = dwarf::DW_TAG_template_value_parameter;
   StringRef Name = "template";
-  DITypeRef Type = getBasicType("basic");
+  DIType *Type = getBasicType("basic");
   Metadata *Value = getConstantAsMetadata();
 
   auto *N = DITemplateValueParameter::get(Context, Tag, Name, Type, Value);
@@ -1741,7 +1737,7 @@ TEST_F(DIGlobalVariableTest, get) {
   StringRef LinkageName = "linkage";
   DIFile *File = getFile();
   unsigned Line = 5;
-  DITypeRef Type = getDerivedType();
+  DIType *Type = getDerivedType();
   bool IsLocalToUnit = false;
   bool IsDefinition = true;
   Constant *Variable = getConstant();
@@ -1814,7 +1810,7 @@ TEST_F(DILocalVariableTest, get) {
   StringRef Name = "name";
   DIFile *File = getFile();
   unsigned Line = 5;
-  DITypeRef Type = getDerivedType();
+  DIType *Type = getDerivedType();
   unsigned Arg = 6;
   unsigned Flags = 7;
   unsigned NotFlags = (~Flags) & ((1 << 16) - 1);
@@ -1934,7 +1930,7 @@ TEST_F(DIObjCPropertyTest, get) {
   StringRef GetterName = "getter";
   StringRef SetterName = "setter";
   unsigned Attributes = 7;
-  DITypeRef Type = getBasicType("basic");
+  DIType *Type = getBasicType("basic");
 
   auto *N = DIObjCProperty::get(Context, Name, File, Line, GetterName,
                                 SetterName, Attributes, Type);
@@ -1975,7 +1971,7 @@ typedef MetadataTest DIImportedEntityTes
 TEST_F(DIImportedEntityTest, get) {
   unsigned Tag = dwarf::DW_TAG_imported_module;
   DIScope *Scope = getSubprogram();
-  DINodeRef Entity = getCompositeType();
+  DINode *Entity = getCompositeType();
   unsigned Line = 5;
   StringRef Name = "name";
 




More information about the llvm-commits mailing list