aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-12-04 17:20:57 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-12-04 17:20:57 +0000
commitff685c562c8fd5dfc6effec17377fde9dad6f271 (patch)
tree2a6157d53ff120ddbdeb81753352475d3b07443f /lib/AST/DeclPrinter.cpp
parent393b008bcebb0a678a5a0a93ad69e28a30a62e84 (diff)
objective-c blocks: Consider padding due to alignment
after the fixed size block header when generating captured block variable info. // rdar://12773256 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r--lib/AST/DeclPrinter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp
index 35bff1035e..493e46be47 100644
--- a/lib/AST/DeclPrinter.cpp
+++ b/lib/AST/DeclPrinter.cpp
@@ -970,6 +970,17 @@ void DeclPrinter::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *PID) {
void DeclPrinter::VisitObjCCategoryDecl(ObjCCategoryDecl *PID) {
Out << "@interface " << *PID->getClassInterface() << '(' << *PID << ")\n";
+ if (PID->ivar_size() > 0) {
+ Out << "{\n";
+ Indentation += Policy.Indentation;
+ for (ObjCCategoryDecl::ivar_iterator I = PID->ivar_begin(),
+ E = PID->ivar_end(); I != E; ++I) {
+ Indent() << I->getType().getAsString(Policy) << ' ' << **I << ";\n";
+ }
+ Indentation -= Policy.Indentation;
+ Out << "}\n";
+ }
+
VisitDeclContext(PID, false);
Out << "@end";