diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-02-15 23:28:07 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-02-15 23:28:07 +0000 |
commit | 6c3d625fd98a517228f829383acdd04df3e8e499 (patch) | |
tree | b7a40a0a2835e58895e6701fd1733ff092e3d9fb /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | a2111793bb08ff9cbf81d8bba7e1eedda02887e9 (diff) | |
download | bcm5719-llvm-6c3d625fd98a517228f829383acdd04df3e8e499.tar.gz bcm5719-llvm-6c3d625fd98a517228f829383acdd04df3e8e499.zip |
[dllimport] Look through typedefs and arrays in HasNonDllImportDtor
The function is used to check whether a type is a class with
non-dllimport destructor. It needs to look through typedefs and array
types.
llvm-svn: 295257
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d8e1d581150..4353e3a922e 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1795,7 +1795,7 @@ CodeGenModule::isTriviallyRecursive(const FunctionDecl *FD) { // Check if T is a class type with a destructor that's not dllimport. static bool HasNonDllImportDtor(QualType T) { - if (const RecordType *RT = dyn_cast<RecordType>(T)) + if (const auto *RT = T->getBaseElementTypeUnsafe()->getAs<RecordType>()) if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(RT->getDecl())) if (RD->getDestructor() && !RD->getDestructor()->hasAttr<DLLImportAttr>()) return true; |