diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp')
| -rw-r--r-- | contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp index 6d903a0d09e2..1928e0df3809 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGCXX.cpp @@ -12,10 +12,11 @@ // We might split this into multiple files if it gets too unwieldy -#include "CodeGenModule.h" #include "CGCXXABI.h" #include "CodeGenFunction.h" +#include "CodeGenModule.h" #include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclObjC.h" @@ -80,7 +81,7 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) { // Skip base classes with trivial destructors. const auto *Base = - cast<CXXRecordDecl>(I.getType()->getAs<RecordType>()->getDecl()); + cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); if (Base->hasTrivialDestructor()) continue; // If we've already found a base class with a non-trivial @@ -104,8 +105,8 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) { // Give up if the calling conventions don't match. We could update the call, // but it is probably not worth it. const CXXDestructorDecl *BaseD = UniqueBase->getDestructor(); - if (BaseD->getType()->getAs<FunctionType>()->getCallConv() != - D->getType()->getAs<FunctionType>()->getCallConv()) + if (BaseD->getType()->castAs<FunctionType>()->getCallConv() != + D->getType()->castAs<FunctionType>()->getCallConv()) return true; GlobalDecl AliasDecl(D, Dtor_Base); |
