From d1b6c770bea9b3da66c6c1eb9a7c483ed7e55c1e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 29 Jan 2017 20:58:47 +0000 Subject: Vendor import of clang release_40 branch r293443: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293443 --- lib/CodeGen/CodeGenFunction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 137c69420ddf..e142a21b1e74 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -112,9 +112,8 @@ CodeGenFunction::~CodeGenFunction() { if (FirstBlockInfo) destroyBlockInfos(FirstBlockInfo); - if (getLangOpts().OpenMP) { + if (getLangOpts().OpenMP && CurFn) CGM.getOpenMPRuntime().functionFinished(*this); - } } CharUnits CodeGenFunction::getNaturalPointeeTypeAlignment(QualType T, -- cgit v1.2.3