forked from OSchip/llvm-project
Add some information about temporaries to the statement dumper.
llvm-svn: 78754
This commit is contained in:
parent
e93b54be8d
commit
0738468322
|
@ -137,6 +137,10 @@ namespace {
|
|||
void VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *Node);
|
||||
void VisitCXXThisExpr(CXXThisExpr *Node);
|
||||
void VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *Node);
|
||||
void VisitCXXConstructExpr(CXXConstructExpr *Node);
|
||||
void VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *Node);
|
||||
void VisitCXXExprWithTemporaries(CXXExprWithTemporaries *Node);
|
||||
void DumpCXXTemporary(CXXTemporary *Temporary);
|
||||
|
||||
// ObjC
|
||||
void VisitObjCEncodeExpr(ObjCEncodeExpr *Node);
|
||||
|
@ -451,6 +455,33 @@ void StmtDumper::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *Node) {
|
|||
Node->getTypeAsWritten().getAsString().c_str());
|
||||
}
|
||||
|
||||
void StmtDumper::VisitCXXConstructExpr(CXXConstructExpr *Node) {
|
||||
DumpExpr(Node);
|
||||
if (Node->isElidable())
|
||||
fprintf(F, "elidable");
|
||||
}
|
||||
|
||||
void StmtDumper::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *Node) {
|
||||
DumpExpr(Node);
|
||||
fprintf(F, " ");
|
||||
DumpCXXTemporary(Node->getTemporary());
|
||||
}
|
||||
|
||||
void StmtDumper::VisitCXXExprWithTemporaries(CXXExprWithTemporaries *Node) {
|
||||
DumpExpr(Node);
|
||||
++IndentLevel;
|
||||
for (unsigned i = 0, e = Node->getNumTemporaries(); i != e; ++i) {
|
||||
fprintf(F, "\n");
|
||||
Indent();
|
||||
DumpCXXTemporary(Node->getTemporary(i));
|
||||
}
|
||||
--IndentLevel;
|
||||
}
|
||||
|
||||
void StmtDumper::DumpCXXTemporary(CXXTemporary *Temporary) {
|
||||
fprintf(F, "(CXXTemporary %p)", (void *)Temporary);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Obj-C Expressions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
Loading…
Reference in New Issue