summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-10-04 23:41:45 +0000
committerJustin Lebar <jlebar@google.com>2016-10-04 23:41:45 +0000
commit49e7614efb5bad5de8d7bcab0fcd59808db5495d (patch)
treef347e8486994771b461349e3a0462a8423c2c309 /clang/lib/CodeGen/CodeGenModule.cpp
parent3aacfafaad4a958bdcc0043b4492f686a3e38d06 (diff)
downloadbcm5719-llvm-49e7614efb5bad5de8d7bcab0fcd59808db5495d.tar.gz
bcm5719-llvm-49e7614efb5bad5de8d7bcab0fcd59808db5495d.zip
[CUDA] Destroy deferred diagnostics before destroying the ASTContext's PartialDiagnostic allocator.
Summary: This will let us (in a separate patch) allocate deferred diagnostics in the ASTContext's PartialDiagnostic arena. Reviewers: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25260 llvm-svn: 283271
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 9bf3ae2752f..845edcd2a17 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -509,6 +509,9 @@ void CodeGenModule::Release() {
DiagnosticBuilder Builder(getDiags().Report(Loc, PD.getDiagID()));
PD.Emit(Builder);
}
+ // Clear the deferred diags so they don't outlive the ASTContext's
+ // PartialDiagnostic allocator.
+ DeferredDiags.clear();
}
void CodeGenModule::UpdateCompletedType(const TagDecl *TD) {
OpenPOWER on IntegriCloud