summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-11-28 19:00:07 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-11-28 19:00:07 +0000
commit719713ab7d310708b83b026519bddce2a406d497 (patch)
treeb28fd4db3a5a3d3aeee1629a3e56044db9bb8fbc /clang/lib/Sema/SemaDeclCXX.cpp
parent2c8a0543107b23d3032b63e010dd4665f251d14f (diff)
downloadbcm5719-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.cpp5
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();
OpenPOWER on IntegriCloud