summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/gnu/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp b/gnu/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp
index 137c69420dd..e142a21b1e7 100644
--- a/gnu/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/gnu/llvm/tools/clang/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,