diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2018-09-21 14:55:26 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-09-21 14:55:26 +0000 |
| commit | f898d1de4a256ad9f2702682bb28715d16503c7a (patch) | |
| tree | 67b6e44cabc9130dab9c7afd976c326afe4f9878 /clang/lib/Sema | |
| parent | 72d627e5ec293611741ed46271afeebf55a23e55 (diff) | |
| download | bcm5719-llvm-f898d1de4a256ad9f2702682bb28715d16503c7a.tar.gz bcm5719-llvm-f898d1de4a256ad9f2702682bb28715d16503c7a.zip | |
[OPENMP] Disable emission of the class with vptr if they are not used in
target constructs.
Prevent compilation of the classes with the virtual tables when
compiling for the device.
llvm-svn: 342741
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index fd0f4874592..95ad45d4954 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -14918,7 +14918,8 @@ void Sema::MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class, // Do not mark as used if compiling for the device outside of the target // region. if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice && - !isInOpenMPDeclareTargetContext() && !getCurFunctionDecl()) + !isInOpenMPDeclareTargetContext() && + !isInOpenMPTargetExecutionDirective()) return; // Try to insert this class into the map. |

