DebugInfo: Require non-null in DIBuilder::retainType()

Assert that a non-null value is being passed in.  Note that I fixed the
one offender in clang in r233443.

llvm-svn: 233445
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index ec5ee7d..4b837af 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -509,7 +509,10 @@
   return createTypeWithFlags(VMContext, Ty, Flags);
 }
 
-void DIBuilder::retainType(DIType T) { AllRetainTypes.emplace_back(T); }
+void DIBuilder::retainType(DIType T) {
+  assert(T.get() && "Expected non-null type");
+  AllRetainTypes.emplace_back(T);
+}
 
 DIBasicType DIBuilder::createUnspecifiedParameter() {
   return DIBasicType();