diff options
| author | Ilya Biryukov <ibiryukov@google.com> | 2019-07-18 11:55:33 +0000 |
|---|---|---|
| committer | Ilya Biryukov <ibiryukov@google.com> | 2019-07-18 11:55:33 +0000 |
| commit | 4f8dc16fcdb6851c91b520d0ee595f5193ef51ef (patch) | |
| tree | 001336fbdb293ef73980ee4ef4a0e4f324d288ef /clang/lib/AST | |
| parent | 8f5b44aead89a56c6fbf85ccfda03ae1e82ac431 (diff) | |
| download | bcm5719-llvm-4f8dc16fcdb6851c91b520d0ee595f5193ef51ef.tar.gz bcm5719-llvm-4f8dc16fcdb6851c91b520d0ee595f5193ef51ef.zip | |
Revert r366422: [OpenCL] Improve destructor support in C++ for OpenCL
Reason: this commit causes crashes in the clang compiler when building
LLVM Support with libc++, see https://bugs.llvm.org/show_bug.cgi?id=42665
for details.
llvm-svn: 366429
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 59710a55498..857ac19e6b1 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -2253,23 +2253,12 @@ CXXMethodDecl::overridden_methods() const { return getASTContext().overridden_methods(this); } -static QualType getThisObjectType(ASTContext &C, const FunctionProtoType *FPT, - const CXXRecordDecl *Decl) { - QualType ClassTy = C.getTypeDeclType(Decl); - return C.getQualifiedType(ClassTy, FPT->getMethodQuals()); -} - QualType CXXMethodDecl::getThisType(const FunctionProtoType *FPT, const CXXRecordDecl *Decl) { ASTContext &C = Decl->getASTContext(); - QualType ObjectTy = ::getThisObjectType(C, FPT, Decl); - return C.getPointerType(ObjectTy); -} - -QualType CXXMethodDecl::getThisObjectType(const FunctionProtoType *FPT, - const CXXRecordDecl *Decl) { - ASTContext &C = Decl->getASTContext(); - return ::getThisObjectType(C, FPT, Decl); + QualType ClassTy = C.getTypeDeclType(Decl); + ClassTy = C.getQualifiedType(ClassTy, FPT->getMethodQuals()); + return C.getPointerType(ClassTy); } QualType CXXMethodDecl::getThisType() const { @@ -2284,14 +2273,6 @@ QualType CXXMethodDecl::getThisType() const { getParent()); } -QualType CXXMethodDecl::getThisObjectType() const { - // Ditto getThisType. - assert(isInstance() && "No 'this' for static methods!"); - - return CXXMethodDecl::getThisObjectType(getType()->getAs<FunctionProtoType>(), - getParent()); -} - bool CXXMethodDecl::hasInlineBody() const { // If this function is a template instantiation, look at the template from // which it was instantiated. |

