diff options
| author | Bruno Ricci <riccibrun@gmail.com> | 2020-07-02 18:55:07 +0100 |
|---|---|---|
| committer | Bruno Ricci <riccibrun@gmail.com> | 2020-07-02 19:29:02 +0100 |
| commit | aa7fd905e4e1bc510448431da9310e8cf5197523 (patch) | |
| tree | 8a1953eabf7ac80fe1ea3a08eed69458992026f8 /clang/lib/CodeGen/CGExprComplex.cpp | |
| parent | 0059f6ffe84241b9728e48c1eabdaf1a6abbef66 (diff) | |
[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.
Diffstat (limited to 'clang/lib/CodeGen/CGExprComplex.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
