diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2016-01-29 20:50:44 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2016-01-29 20:50:44 +0000 |
commit | eb2a25467e9ff2ef1976924957c0dfa31bda9e03 (patch) | |
tree | c32c7925dbf37ea245a5e7b8b9028df73620a0e8 /llvm/lib/IR | |
parent | deec50a3d2339af731b42b5c9f7308f861acae5f (diff) | |
download | bcm5719-llvm-eb2a25467e9ff2ef1976924957c0dfa31bda9e03.tar.gz bcm5719-llvm-eb2a25467e9ff2ef1976924957c0dfa31bda9e03.zip |
Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment.
clang part in r259232, this is the LLVM part of the patch.
llvm-svn: 259240
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/IR/ConstantRange.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/DebugLoc.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/GCOV.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/IR/LegacyPassManager.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/Pass.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/ValueSymbolTable.cpp | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index 6c9d43d29df..ee5a2346970 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -599,7 +599,7 @@ uint64_t AttributeSetImpl::Raw(unsigned Index) const { return 0; } -void AttributeSetImpl::dump() const { +LLVM_DUMP_METHOD void AttributeSetImpl::dump() const { AttributeSet(const_cast<AttributeSetImpl *>(this)).dump(); } @@ -1102,7 +1102,7 @@ uint64_t AttributeSet::Raw(unsigned Index) const { return pImpl ? pImpl->Raw(Index) : 0; } -void AttributeSet::dump() const { +LLVM_DUMP_METHOD void AttributeSet::dump() const { dbgs() << "PAL[\n"; for (unsigned i = 0, e = getNumSlots(); i < e; ++i) { diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index 48f9b27a25a..460b778bcc5 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/lib/IR/ConstantRange.cpp @@ -819,6 +819,6 @@ void ConstantRange::print(raw_ostream &OS) const { /// dump - Allow printing from a debugger easily... /// -void ConstantRange::dump() const { +LLVM_DUMP_METHOD void ConstantRange::dump() const { print(dbgs()); } diff --git a/llvm/lib/IR/DebugLoc.cpp b/llvm/lib/IR/DebugLoc.cpp index 72d5c0e6188..980bf2aacb6 100644 --- a/llvm/lib/IR/DebugLoc.cpp +++ b/llvm/lib/IR/DebugLoc.cpp @@ -67,7 +67,7 @@ DebugLoc DebugLoc::get(unsigned Line, unsigned Col, const MDNode *Scope, const_cast<MDNode *>(InlinedAt)); } -void DebugLoc::dump() const { +LLVM_DUMP_METHOD void DebugLoc::dump() const { #ifndef NDEBUG if (!Loc) return; diff --git a/llvm/lib/IR/GCOV.cpp b/llvm/lib/IR/GCOV.cpp index 35b8157751b..fd6ebcabc8e 100644 --- a/llvm/lib/IR/GCOV.cpp +++ b/llvm/lib/IR/GCOV.cpp @@ -104,7 +104,7 @@ bool GCOVFile::readGCDA(GCOVBuffer &Buffer) { } /// dump - Dump GCOVFile content to dbgs() for debugging purposes. -void GCOVFile::dump() const { +LLVM_DUMP_METHOD void GCOVFile::dump() const { for (const auto &FPtr : Functions) FPtr->dump(); } @@ -340,7 +340,7 @@ uint64_t GCOVFunction::getExitCount() const { } /// dump - Dump GCOVFunction content to dbgs() for debugging purposes. -void GCOVFunction::dump() const { +LLVM_DUMP_METHOD void GCOVFunction::dump() const { dbgs() << "===== " << Name << " (" << Ident << ") @ " << Filename << ":" << LineNumber << "\n"; for (const auto &Block : Blocks) @@ -397,7 +397,7 @@ void GCOVBlock::collectLineCounts(FileInfo &FI) { } /// dump - Dump GCOVBlock content to dbgs() for debugging purposes. -void GCOVBlock::dump() const { +LLVM_DUMP_METHOD void GCOVBlock::dump() const { dbgs() << "Block : " << Number << " Counter : " << Counter << "\n"; if (!SrcEdges.empty()) { dbgs() << "\tSource Edges : "; diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index 63d89f21b35..a0793d01b3c 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -1827,7 +1827,7 @@ void PMStack::push(PMDataManager *PM) { } // Dump content of the pass manager stack. -void PMStack::dump() const { +LLVM_DUMP_METHOD void PMStack::dump() const { for (PMDataManager *Manager : S) dbgs() << Manager->getAsPass()->getPassName() << ' '; diff --git a/llvm/lib/IR/Pass.cpp b/llvm/lib/IR/Pass.cpp index df45460a6cc..8ce65596b76 100644 --- a/llvm/lib/IR/Pass.cpp +++ b/llvm/lib/IR/Pass.cpp @@ -113,7 +113,7 @@ void Pass::print(raw_ostream &O,const Module*) const { } // dump - call print(cerr); -void Pass::dump() const { +LLVM_DUMP_METHOD void Pass::dump() const { print(dbgs(), nullptr); } diff --git a/llvm/lib/IR/ValueSymbolTable.cpp b/llvm/lib/IR/ValueSymbolTable.cpp index deb6e7573e7..8305a2b3ae7 100644 --- a/llvm/lib/IR/ValueSymbolTable.cpp +++ b/llvm/lib/IR/ValueSymbolTable.cpp @@ -97,7 +97,7 @@ ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) { // dump - print out the symbol table // -void ValueSymbolTable::dump() const { +LLVM_DUMP_METHOD void ValueSymbolTable::dump() const { //DEBUG(dbgs() << "ValueSymbolTable:\n"); for (const_iterator I = begin(), E = end(); I != E; ++I) { //DEBUG(dbgs() << " '" << I->getKeyData() << "' = "); |