diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-04-19 20:44:53 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-04-19 20:44:53 +0000 |
| commit | ccabe48235f8269cceba7f01a7acd88e252b4293 (patch) | |
| tree | 93c3f611af311987e57de63a2b3df3a86a77d9aa /clang/lib/AST/ASTContext.cpp | |
| parent | 2ea5183b5951d125673e510198af04d92591623c (diff) | |
| download | bcm5719-llvm-ccabe48235f8269cceba7f01a7acd88e252b4293.tar.gz bcm5719-llvm-ccabe48235f8269cceba7f01a7acd88e252b4293.zip | |
AST: Dump ASTRecordLayout objects when they are created with -fdump-record-layouts.
llvm-svn: 101815
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index a3c08d56b04..96e2e75eaaa 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -998,6 +998,11 @@ const ASTRecordLayout &ASTContext::getASTRecordLayout(const RecordDecl *D) { ASTRecordLayoutBuilder::ComputeLayout(*this, D); ASTRecordLayouts[D] = NewEntry; + if (getLangOptions().DumpRecordLayouts) { + llvm::errs() << "\n*** Dumping AST Record Layout\n"; + DumpRecordLayout(D, llvm::errs()); + } + return *NewEntry; } |

