summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index a01aad66b07..f31a05a9a67 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -391,7 +391,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
EmitCall(CGM.getTypes().getFunctionInfo(FD), F, Args);
}
- if (needsDispose) {
+ if (needsDispose && CGM.getLangOptions().getGCMode() != LangOptions::GCOnly) {
CleanupScope scope(*this);
BuildBlockRelease(D, DeclPtr);
}
OpenPOWER on IntegriCloud