summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-29 20:58:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-29 20:58:47 +0000
commitd1b6c770bea9b3da66c6c1eb9a7c483ed7e55c1e (patch)
treefe0f8eccf127c346ac2e08e36ec2af95072f4458 /lib/CodeGen/CodeGenFunction.cpp
parent865493b10990f9932c79d135eef448ff418792ab (diff)
Notes
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 137c69420ddf6..e142a21b1e744 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,