summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-27 23:00:49 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-27 23:00:49 +0000
commitd9ccfb9e0160dc91afafc665b45c1121cc20302c (patch)
tree5a7ed43a5afb2e7e830f57c767dd6ba1158a1488 /llvm/lib/IR/DIBuilder.cpp
parent49147e30f8d263d6a7211fb28e40d92e5dde76df (diff)
downloadbcm5719-llvm-d9ccfb9e0160dc91afafc665b45c1121cc20302c.tar.gz
bcm5719-llvm-d9ccfb9e0160dc91afafc665b45c1121cc20302c.zip
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
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