summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index ec5ee7da5cb..4b837af9d44 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -509,7 +509,10 @@ DIType DIBuilder::createObjectPointerType(DIType Ty) {
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();
OpenPOWER on IntegriCloud