diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-11-28 19:00:07 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-11-28 19:00:07 +0000 |
commit | 719713ab7d310708b83b026519bddce2a406d497 (patch) | |
tree | b28fd4db3a5a3d3aeee1629a3e56044db9bb8fbc /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | 2c8a0543107b23d3032b63e010dd4665f251d14f (diff) | |
download | bcm5719-llvm-719713ab7d310708b83b026519bddce2a406d497.tar.gz bcm5719-llvm-719713ab7d310708b83b026519bddce2a406d497.zip |
[OPENMP]Fix emission of the target regions in virtual functions.
Fixed emission of the target regions found in the virtual functions.
Previously we may end up with the situation when those regions could be
skipped.
llvm-svn: 347793
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 8a716ed4cca..e408c043791 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -14968,8 +14968,11 @@ void Sema::MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class, // region. if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice && !isInOpenMPDeclareTargetContext() && - !isInOpenMPTargetExecutionDirective()) + !isInOpenMPTargetExecutionDirective()) { + if (!DefinitionRequired) + MarkVirtualMembersReferenced(Loc, Class); return; + } // Try to insert this class into the map. LoadExternalVTableUses(); |