Debug Info: cleanup

llvm-svn: 185456
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 9a9df49..6cb13a0 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -863,9 +863,10 @@
     ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang)
   };
   MDNode *Node = MDNode::getTemporary(VMContext, Elts);
-  assert(DIType(Node).isType() &&
+  DIType RetTy(Node);
+  assert(RetTy.isType() &&
          "createForwardDecl result should be a DIType");
-  return DIType(Node);
+  return RetTy;
 }
 
 /// getOrCreateArray - Get a DIArray, create one if required.
@@ -978,9 +979,10 @@
     NamedMDNode *FnLocals = getOrInsertFnSpecificMDNode(M, Fn);
     FnLocals->addOperand(Node);
   }
-  assert(DIVariable(Node).isVariable() &&
+  DIVariable RetVar(Node);
+  assert(RetVar.isVariable() &&
          "createLocalVariable should return a valid DIVariable");
-  return DIVariable(Node);
+  return RetVar;
 }
 
 /// createComplexVariable - Create a new descriptor for the specified variable
diff --git a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
index 7bc4da7..f4109eff 100644
--- a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
@@ -216,10 +216,10 @@
 
     int FuncFlags = llvm::DIDescriptor::FlagPrototyped;
     assert(CUNode && FileNode);
-    MDNode *Sub = Builder.createFunction(
+    DISubprogram Sub = Builder.createFunction(
         DICompileUnit(CUNode), F.getName(), MangledName, DIFile(FileNode), Line,
         Sig, Local, IsDefinition, ScopeLine, FuncFlags, IsOptimized, &F);
-    assert(DISubprogram(Sub).isSubprogram());
+    assert(Sub.isSubprogram());
     DEBUG(dbgs() << "create subprogram mdnode " << Sub << ": "
                  << "\n");