diff options
author | Anders Carlsson <andersca@mac.com> | 2010-02-11 18:20:28 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-02-11 18:20:28 +0000 |
commit | 848fa64143fbe5ae62a601ad61277f741e54dfab (patch) | |
tree | bc0dedaa6e2d1dba6c8d194763c36182530a83a9 /lib/AST/Expr.cpp | |
parent | b203c9ee39be3170a7d545db057de8ea62959259 (diff) |
More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 1af4bf8773..73f6a2c915 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -163,17 +163,18 @@ SourceRange DeclRefExpr::getSourceRange() const { // FIXME: Maybe this should use DeclPrinter with a special "print predefined // expr" policy instead. -std::string PredefinedExpr::ComputeName(ASTContext &Context, IdentType IT, - const Decl *CurrentDecl) { +std::string PredefinedExpr::ComputeName(IdentType IT, const Decl *CurrentDecl) { + ASTContext &Context = CurrentDecl->getASTContext(); + if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurrentDecl)) { - if (IT != PrettyFunction) + if (IT != PrettyFunction && IT != PrettyFunctionNoVirtual) return FD->getNameAsString(); llvm::SmallString<256> Name; llvm::raw_svector_ostream Out(Name); if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) { - if (MD->isVirtual()) + if (MD->isVirtual() && IT != PrettyFunctionNoVirtual) Out << "virtual "; if (MD->isStatic()) Out << "static "; |