Revert "Try a third time to fix MSVC build after r234290"
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Apr 2015 18:07:41 +0000 (18:07 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Apr 2015 18:07:41 +0000 (18:07 +0000)
This reverts commit r234295 (and r234294 and r234292 before it).  I
removed the implicit conversion to `MDTuple*` r234326, so there's no
longer an ambiguity in `operator[]()`.

I think MSVC should accept the original code now...

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

lib/CodeGen/AsmPrinter/DwarfUnit.cpp

index 253010c6443f669d69c5f842266705d8c69e8aff..f4c430ae70574d7b7a28f83f4c35980a8164dfc3 100644 (file)
@@ -1015,11 +1015,11 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
     // Add return type. A void return won't have a type.
     auto Elements = cast<MDSubroutineType>(CTy)->getTypeArray();
     if (Elements.size())
-      if (MDType *RTy = resolve(DITypeRef(Elements[0u])))
+      if (auto RTy = resolve(Elements[0]))
         addType(Buffer, RTy);
 
     bool isPrototyped = true;
-    if (Elements.size() == 2 && !DITypeRef(Elements[1u]))
+    if (Elements.size() == 2 && !Elements[1])
       isPrototyped = false;
 
     constructSubprogramArguments(Buffer, Elements);
@@ -1318,7 +1318,7 @@ void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie,
   // Add a return type. If this is a type like a C/C++ void type we don't add a
   // return type.
   if (Args.size())
-    if (MDType *Ty = resolve(DITypeRef(Args[0u])))
+    if (auto Ty = resolve(Args[0]))
       addType(SPDie, Ty);
 
   unsigned VK = SP.getVirtuality();