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 | 8d8ab749f6f8bb63ea2cd2b589c0f050b67fc5cc (patch) | |
tree | 0662ad969a46c9e002fc3b3b720f18279112d7c6 /lib/AST/ASTContext.cpp | |
parent | 2e7b7c2f267e0bf8047608aa1cd6691c0bf86792 (diff) |
AST: Dump ASTRecordLayout objects when they are created with -fdump-record-layouts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index a3c08d56b0..96e2e75eaa 100644 --- a/lib/AST/ASTContext.cpp +++ b/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; } |