From aa7fd905e4e1bc510448431da9310e8cf5197523 Mon Sep 17 00:00:00 2001 From: Bruno Ricci Date: Thu, 2 Jul 2020 18:55:07 +0100 Subject: [clang][NFC] Store a pointer to the ASTContext in ASTDumper and TextNodeDumper In general there is no way to get to the ASTContext from most AST nodes (Decls are one of the exception). This will be a problem when implementing the rest of APValue::dump since we need the ASTContext to dump some kinds of APValues. The ASTContext* in ASTDumper and TextNodeDumper is not always non-null. This is because we still want to be able to use the various dump() functions in a debugger. No functional changes intended. --- clang/lib/CodeGen/CGExprComplex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExprComplex.cpp') diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 13a571352137..a49817898ae3 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -98,7 +98,7 @@ public: } ComplexPairTy VisitStmt(Stmt *S) { - S->dump(CGF.getContext().getSourceManager()); + S->dump(llvm::errs(), CGF.getContext()); llvm_unreachable("Stmt can't have complex result type!"); } ComplexPairTy VisitExpr(Expr *S); -- cgit v1.2.3