Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment.

llvm-svn: 259232
This commit is contained in:
Yaron Keren 2016-01-29 19:38:18 +00:00
parent 4553723825
commit cdae941e03
26 changed files with 34 additions and 34 deletions

View File

@ -255,7 +255,7 @@ void APValue::swap(APValue &RHS) {
memcpy(RHS.Data.buffer, TmpData, DataSize);
}
void APValue::dump() const {
LLVM_DUMP_METHOD void APValue::dump() const {
dump(llvm::errs());
llvm::errs() << '\n';
}

View File

@ -333,7 +333,7 @@ DeclarationName DeclarationName::getUsingDirectiveName() {
return DeclarationName(Ptr);
}
void DeclarationName::dump() const {
LLVM_DUMP_METHOD void DeclarationName::dump() const {
llvm::errs() << *this << '\n';
}

View File

@ -322,7 +322,7 @@ void NestedNameSpecifier::dump(const LangOptions &LO) const {
print(llvm::errs(), PrintingPolicy(LO));
}
void NestedNameSpecifier::dump() const {
LLVM_DUMP_METHOD void NestedNameSpecifier::dump() const {
LangOptions LO;
print(llvm::errs(), PrintingPolicy(LO));
}

View File

@ -422,7 +422,7 @@ void TemplateArgument::dump(raw_ostream &Out) const {
print(PrintingPolicy(LO), Out);
}
void TemplateArgument::dump() const { dump(llvm::errs()); }
LLVM_DUMP_METHOD void TemplateArgument::dump() const { dump(llvm::errs()); }
//===----------------------------------------------------------------------===//
// TemplateArgumentLoc Implementation

View File

@ -227,6 +227,6 @@ void TemplateName::dump(raw_ostream &OS) const {
print(OS, PrintingPolicy(LO));
}
void TemplateName::dump() const {
LLVM_DUMP_METHOD void TemplateName::dump() const {
dump(llvm::errs());
}

View File

@ -4514,7 +4514,7 @@ void CFGBlock::dump(const CFG* cfg, const LangOptions &LO,
print(llvm::errs(), cfg, LO, ShowColors);
}
void CFGBlock::dump() const {
LLVM_DUMP_METHOD void CFGBlock::dump() const {
dump(getParent(), LangOptions(), false);
}

View File

@ -188,7 +188,7 @@ void CallGraph::print(raw_ostream &OS) const {
OS.flush();
}
void CallGraph::dump() const {
LLVM_DUMP_METHOD void CallGraph::dump() const {
print(llvm::errs());
}
@ -202,7 +202,7 @@ void CallGraphNode::print(raw_ostream &os) const {
os << "< >";
}
void CallGraphNode::dump() const {
LLVM_DUMP_METHOD void CallGraphNode::dump() const {
print(llvm::errs());
}

View File

@ -486,7 +486,7 @@ void Module::print(raw_ostream &OS, unsigned Indent) const {
OS << "}\n";
}
void Module::dump() const {
LLVM_DUMP_METHOD void Module::dump() const {
print(llvm::errs());
}

View File

@ -842,7 +842,7 @@ void CGRecordLayout::print(raw_ostream &OS) const {
OS << "]>\n";
}
void CGRecordLayout::dump() const {
LLVM_DUMP_METHOD void CGRecordLayout::dump() const {
print(llvm::errs());
}
@ -855,6 +855,6 @@ void CGBitFieldInfo::print(raw_ostream &OS) const {
<< " StorageOffset:" << StorageOffset.getQuantity() << ">";
}
void CGBitFieldInfo::dump() const {
LLVM_DUMP_METHOD void CGBitFieldInfo::dump() const {
print(llvm::errs());
}

View File

@ -130,7 +130,7 @@ bool ABIInfo::shouldSignExtUnsignedType(QualType Ty) const {
return false;
}
void ABIArgInfo::dump() const {
LLVM_DUMP_METHOD void ABIArgInfo::dump() const {
raw_ostream &OS = llvm::errs();
OS << "(ABIArgInfo Kind=";
switch (TheKind) {

View File

@ -188,7 +188,7 @@ LayoutOverrideSource::layoutRecordType(const RecordDecl *Record,
return true;
}
void LayoutOverrideSource::dump() {
LLVM_DUMP_METHOD void LayoutOverrideSource::dump() {
raw_ostream &OS = llvm::errs();
for (llvm::StringMap<Layout>::iterator L = Layouts.begin(),
LEnd = Layouts.end();

View File

@ -174,7 +174,7 @@ const char *HeaderMap::getString(unsigned StrTabIdx) const {
//===----------------------------------------------------------------------===//
/// dump - Print the contents of this headermap to stderr.
void HeaderMap::dump() const {
LLVM_DUMP_METHOD void HeaderMap::dump() const {
const HMapHeader &Hdr = getHeader();
unsigned NumBuckets = getEndianAdjustedWord(Hdr.NumBuckets);

View File

@ -126,7 +126,7 @@ bool MacroInfo::isIdenticalTo(const MacroInfo &Other, Preprocessor &PP,
return true;
}
void MacroInfo::dump() const {
LLVM_DUMP_METHOD void MacroInfo::dump() const {
llvm::raw_ostream &Out = llvm::errs();
// FIXME: Dump locations.
@ -209,7 +209,7 @@ MacroDirective::findDirectiveAtLoc(SourceLocation L, SourceManager &SM) const {
return DefInfo();
}
void MacroDirective::dump() const {
LLVM_DUMP_METHOD void MacroDirective::dump() const {
llvm::raw_ostream &Out = llvm::errs();
switch (getKind()) {

View File

@ -853,7 +853,7 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M, const FileEntry *ModMap) {
InferredModuleAllowedBy[M] = ModMap;
}
void ModuleMap::dump() {
LLVM_DUMP_METHOD void ModuleMap::dump() {
llvm::errs() << "Modules:";
for (llvm::StringMap<Module *>::iterator M = Modules.begin(),
MEnd = Modules.end();

View File

@ -130,7 +130,7 @@ void Scope::mergeNRVOIntoParent() {
getParent()->addNRVOCandidate(NRVO.getPointer());
}
void Scope::dump() const { dumpImpl(llvm::errs()); }
LLVM_DUMP_METHOD void Scope::dump() const { dumpImpl(llvm::errs()); }
void Scope::dumpImpl(raw_ostream &OS) const {
unsigned Flags = getFlags();

View File

@ -2928,7 +2928,7 @@ unsigned InitializedEntity::dumpImpl(raw_ostream &OS) const {
return Depth + 1;
}
void InitializedEntity::dump() const {
LLVM_DUMP_METHOD void InitializedEntity::dump() const {
dumpImpl(llvm::errs());
}

View File

@ -433,7 +433,7 @@ StandardConversionSequence::getNarrowingKind(ASTContext &Ctx,
/// dump - Print this standard conversion sequence to standard
/// error. Useful for debugging overloading issues.
void StandardConversionSequence::dump() const {
LLVM_DUMP_METHOD void StandardConversionSequence::dump() const {
raw_ostream &OS = llvm::errs();
bool PrintedSomething = false;
if (First != ICK_Identity) {

View File

@ -6883,7 +6883,7 @@ dumpModuleIDMap(StringRef Name,
}
}
void ASTReader::dump() {
LLVM_DUMP_METHOD void ASTReader::dump() {
llvm::errs() << "*** PCH/ModuleFile Remappings:\n";
dumpModuleIDMap("Global bit offset map", GlobalBitOffsetsMap);
dumpModuleIDMap("Global source location entry map", GlobalSLocEntryMap);

View File

@ -354,7 +354,7 @@ void GlobalModuleIndex::printStats() {
std::fprintf(stderr, "\n");
}
void GlobalModuleIndex::dump() {
LLVM_DUMP_METHOD void GlobalModuleIndex::dump() {
llvm::errs() << "*** Global Module Index Dump:\n";
llvm::errs() << "Module files:\n";
for (auto &MI : Modules) {

View File

@ -65,7 +65,7 @@ dumpLocalRemap(StringRef Name,
}
}
void ModuleFile::dump() {
LLVM_DUMP_METHOD void ModuleFile::dump() {
llvm::errs() << "\nModule: " << FileName << "\n";
if (!Imports.empty()) {
llvm::errs() << " Imports: ";

View File

@ -211,7 +211,7 @@ void ArrayBoundCheckerV2::reportOOB(CheckerContext &checkerContext,
llvm::make_unique<BugReport>(*BT, os.str(), errorNode));
}
void RegionRawOffsetV2::dump() const {
LLVM_DUMP_METHOD void RegionRawOffsetV2::dump() const {
dumpToStream(llvm::errs());
}

View File

@ -3487,7 +3487,7 @@ LLVM_DUMP_METHOD void PathPieces::dump() const {
}
}
void PathDiagnosticCallPiece::dump() const {
LLVM_DUMP_METHOD void PathDiagnosticCallPiece::dump() const {
llvm::errs() << "CALL\n--------------\n";
if (const Stmt *SLoc = getLocStmt(getLocation()))
@ -3498,26 +3498,26 @@ void PathDiagnosticCallPiece::dump() const {
getLocation().dump();
}
void PathDiagnosticEventPiece::dump() const {
LLVM_DUMP_METHOD void PathDiagnosticEventPiece::dump() const {
llvm::errs() << "EVENT\n--------------\n";
llvm::errs() << getString() << "\n";
llvm::errs() << " ---- at ----\n";
getLocation().dump();
}
void PathDiagnosticControlFlowPiece::dump() const {
LLVM_DUMP_METHOD void PathDiagnosticControlFlowPiece::dump() const {
llvm::errs() << "CONTROL\n--------------\n";
getStartLocation().dump();
llvm::errs() << " ---- to ----\n";
getEndLocation().dump();
}
void PathDiagnosticMacroPiece::dump() const {
LLVM_DUMP_METHOD void PathDiagnosticMacroPiece::dump() const {
llvm::errs() << "MACRO\n--------------\n";
// FIXME: Print which macro is being invoked.
}
void PathDiagnosticLocation::dump() const {
LLVM_DUMP_METHOD void PathDiagnosticLocation::dump() const {
if (!isValid()) {
llvm::errs() << "<INVALID>\n";
return;

View File

@ -438,7 +438,7 @@ void SubRegion::anchor() { }
// Region pretty-printing.
//===----------------------------------------------------------------------===//
void MemRegion::dump() const {
LLVM_DUMP_METHOD void MemRegion::dump() const {
dumpToStream(llvm::errs());
}
@ -525,7 +525,7 @@ void VarRegion::dumpToStream(raw_ostream &os) const {
os << *cast<VarDecl>(D);
}
void RegionRawOffset::dump() const {
LLVM_DUMP_METHOD void RegionRawOffset::dump() const {
dumpToStream(llvm::errs());
}

View File

@ -439,7 +439,7 @@ void ProgramState::printDOT(raw_ostream &Out) const {
print(Out, "\\l", "\\|");
}
void ProgramState::dump() const {
LLVM_DUMP_METHOD void ProgramState::dump() const {
print(llvm::errs());
}

View File

@ -236,7 +236,7 @@ SVal loc::ConcreteInt::evalBinOp(BasicValueFactory& BasicVals,
// Pretty-Printing.
//===----------------------------------------------------------------------===//
void SVal::dump() const { dumpToStream(llvm::errs()); }
LLVM_DUMP_METHOD void SVal::dump() const { dumpToStream(llvm::errs()); }
void SVal::dumpToStream(raw_ostream &os) const {
switch (getBaseKind()) {

View File

@ -23,7 +23,7 @@ using namespace ento;
void SymExpr::anchor() { }
void SymExpr::dump() const {
LLVM_DUMP_METHOD void SymExpr::dump() const {
dumpToStream(llvm::errs());
}