void Transaction::DelayCallInfo::print(llvm::raw_ostream& Out, const PrintingPolicy& Policy, unsigned Indent, bool PrintInstantiation, llvm::StringRef prependInfo /*=""*/) const { static const char* const stateNames[Transaction::kCCINumStates] = { "kCCINone", "kCCIHandleTopLevelDecl", "kCCIHandleInterestingDecl", "kCCIHandleTagDeclDefinition", "kCCIHandleVTable", "kCCIHandleCXXImplicitFunctionInstantiation", "kCCIHandleCXXStaticMemberVarInstantiation", }; assert((sizeof(stateNames) /sizeof(void*)) == Transaction::kCCINumStates && "Missing states?"); if (!prependInfo.empty()) { Out.changeColor(llvm::raw_ostream::RED); Out << prependInfo; Out.resetColor(); Out << ", "; } Out.changeColor(llvm::raw_ostream::BLUE); Out << stateNames[m_Call]; Out.changeColor(llvm::raw_ostream::GREEN); Out << " <- "; Out.resetColor(); for (DeclGroupRef::const_iterator I = m_DGR.begin(), E = m_DGR.end(); I != E; ++I) { if (*I) (*I)->print(Out, Policy, Indent, PrintInstantiation); else Out << "<<NULL DECL>>"; Out << '\n'; } }
void Table::Dump(llvm::raw_ostream &OS, llvm::StringRef Prefix) const { for(unsigned I = 0, E = RowsCount(); I < E; ++I) { if(!Prefix.empty()) { OS.changeColor(llvm::raw_ostream::GREEN) << Prefix << ": "; OS.resetColor(); } for(unsigned J = 0, K = ColsCount(); J < K; ++J) { llvm::StringRef Cell = Columns[J][I]; OS.indent(Columns[J].GetWidth() - Cell.size()) << Cell; if(J != K - 1) OS << " "; } OS << "\n"; } }