Sfoglia il codice sorgente

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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259240 91177308-0d34-0410-b5e6-96231b3b80d8

Yaron Keren 9 anni fa
parent
commit
55307987a1
51 ha cambiato i file con 71 aggiunte e 72 eliminazioni
  1. 2 2
      lib/Analysis/AliasSetTracker.cpp
  2. 1 1
      lib/Analysis/BlockFrequencyInfoImpl.cpp
  3. 1 1
      lib/Analysis/DominanceFrontier.cpp
  4. 1 1
      lib/Analysis/IVUsers.cpp
  5. 1 1
      lib/Analysis/InlineCost.cpp
  6. 1 1
      lib/Analysis/LoopInfo.cpp
  7. 1 1
      lib/Analysis/PHITransAddr.cpp
  8. 1 1
      lib/Analysis/RegionInfo.cpp
  9. 1 1
      lib/Analysis/Trace.cpp
  10. 1 1
      lib/Bitcode/Writer/ValueEnumerator.cpp
  11. 1 1
      lib/CodeGen/CodeGenPrepare.cpp
  12. 1 1
      lib/CodeGen/LiveDebugVariables.cpp
  13. 4 5
      lib/CodeGen/LiveInterval.cpp
  14. 1 1
      lib/CodeGen/LivePhysRegs.cpp
  15. 1 1
      lib/CodeGen/LiveVariables.cpp
  16. 1 1
      lib/CodeGen/MachineBasicBlock.cpp
  17. 3 3
      lib/CodeGen/MachineFunction.cpp
  18. 1 1
      lib/CodeGen/MachineInstr.cpp
  19. 1 1
      lib/CodeGen/MachineLoopInfo.cpp
  20. 1 1
      lib/CodeGen/MachineRegionInfo.cpp
  21. 1 1
      lib/CodeGen/RegAllocPBQP.cpp
  22. 1 1
      lib/CodeGen/ScoreboardHazardRecognizer.cpp
  23. 2 2
      lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
  24. 2 2
      lib/CodeGen/SlotIndexes.cpp
  25. 1 1
      lib/CodeGen/SplitKit.cpp
  26. 1 1
      lib/CodeGen/StackColoring.cpp
  27. 1 1
      lib/CodeGen/VirtRegMap.cpp
  28. 2 2
      lib/IR/Attributes.cpp
  29. 1 1
      lib/IR/ConstantRange.cpp
  30. 1 1
      lib/IR/DebugLoc.cpp
  31. 3 3
      lib/IR/GCOV.cpp
  32. 1 1
      lib/IR/LegacyPassManager.cpp
  33. 1 1
      lib/IR/Pass.cpp
  34. 1 1
      lib/IR/ValueSymbolTable.cpp
  35. 1 1
      lib/MC/MCExpr.cpp
  36. 2 2
      lib/MC/MCFragment.cpp
  37. 2 2
      lib/MC/MCInst.cpp
  38. 1 1
      lib/MC/MCLabel.cpp
  39. 1 1
      lib/MC/MCParser/MCAsmParser.cpp
  40. 1 1
      lib/MC/MCSection.cpp
  41. 1 1
      lib/MC/MCSymbol.cpp
  42. 1 1
      lib/MC/MCValue.cpp
  43. 1 1
      lib/MC/SubtargetFeature.cpp
  44. 1 1
      lib/Option/Option.cpp
  45. 3 3
      lib/ProfileData/SampleProf.cpp
  46. 1 1
      lib/Support/APInt.cpp
  47. 1 1
      lib/Support/BranchProbability.cpp
  48. 1 1
      lib/Support/Twine.cpp
  49. 6 6
      lib/TableGen/Record.cpp
  50. 1 1
      lib/TableGen/TGParser.cpp
  51. 1 1
      lib/Target/ARM/ARMConstantPoolValue.cpp

+ 2 - 2
lib/Analysis/AliasSetTracker.cpp

@@ -608,8 +608,8 @@ void AliasSetTracker::print(raw_ostream &OS) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void AliasSet::dump() const { print(dbgs()); }
-void AliasSetTracker::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD void AliasSet::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD void AliasSetTracker::dump() const { print(dbgs()); }
 #endif
 #endif
 
 
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//

+ 1 - 1
lib/Analysis/BlockFrequencyInfoImpl.cpp

@@ -27,7 +27,7 @@ ScaledNumber<uint64_t> BlockMass::toScaled() const {
   return ScaledNumber<uint64_t>(getMass() + 1, -64);
   return ScaledNumber<uint64_t>(getMass() + 1, -64);
 }
 }
 
 
-void BlockMass::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD void BlockMass::dump() const { print(dbgs()); }
 
 
 static char getHexDigit(int N) {
 static char getHexDigit(int N) {
   assert(N < 16);
   assert(N < 16);

+ 1 - 1
lib/Analysis/DominanceFrontier.cpp

@@ -51,7 +51,7 @@ void DominanceFrontier::print(raw_ostream &OS, const Module *) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void DominanceFrontier::dump() const {
+LLVM_DUMP_METHOD void DominanceFrontier::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 1 - 1
lib/Analysis/IVUsers.cpp

@@ -312,7 +312,7 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void IVUsers::dump() const {
+LLVM_DUMP_METHOD void IVUsers::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 1 - 1
lib/Analysis/InlineCost.cpp

@@ -1386,7 +1386,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 /// \brief Dump stats about this call's analysis.
 /// \brief Dump stats about this call's analysis.
-void CallAnalyzer::dump() {
+LLVM_DUMP_METHOD void CallAnalyzer::dump() {
 #define DEBUG_PRINT_STAT(x) dbgs() << "      " #x ": " << x << "\n"
 #define DEBUG_PRINT_STAT(x) dbgs() << "      " #x ": " << x << "\n"
   DEBUG_PRINT_STAT(NumConstantArgs);
   DEBUG_PRINT_STAT(NumConstantArgs);
   DEBUG_PRINT_STAT(NumConstantOffsetPtrArgs);
   DEBUG_PRINT_STAT(NumConstantOffsetPtrArgs);

+ 1 - 1
lib/Analysis/LoopInfo.cpp

@@ -379,7 +379,7 @@ BasicBlock *Loop::getUniqueExitBlock() const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void Loop::dump() const {
+LLVM_DUMP_METHOD void Loop::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 1 - 1
lib/Analysis/PHITransAddr.cpp

@@ -42,7 +42,7 @@ static bool CanPHITrans(Instruction *Inst) {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void PHITransAddr::dump() const {
+LLVM_DUMP_METHOD void PHITransAddr::dump() const {
   if (!Addr) {
   if (!Addr) {
     dbgs() << "PHITransAddr: null\n";
     dbgs() << "PHITransAddr: null\n";
     return;
     return;

+ 1 - 1
lib/Analysis/RegionInfo.cpp

@@ -155,7 +155,7 @@ void RegionInfoPass::print(raw_ostream &OS, const Module *) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void RegionInfoPass::dump() const {
+LLVM_DUMP_METHOD void RegionInfoPass::dump() const {
   RI.dump();
   RI.dump();
 }
 }
 #endif
 #endif

+ 1 - 1
lib/Analysis/Trace.cpp

@@ -46,7 +46,7 @@ void Trace::print(raw_ostream &O) const {
 /// dump - Debugger convenience method; writes trace to standard error
 /// dump - Debugger convenience method; writes trace to standard error
 /// output stream.
 /// output stream.
 ///
 ///
-void Trace::dump() const {
+LLVM_DUMP_METHOD void Trace::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 1 - 1
lib/Bitcode/Writer/ValueEnumerator.cpp

@@ -402,7 +402,7 @@ unsigned ValueEnumerator::getValueID(const Value *V) const {
   return I->second-1;
   return I->second-1;
 }
 }
 
 
-void ValueEnumerator::dump() const {
+LLVM_DUMP_METHOD void ValueEnumerator::dump() const {
   print(dbgs(), ValueMap, "Default");
   print(dbgs(), ValueMap, "Default");
   dbgs() << '\n';
   dbgs() << '\n';
   print(dbgs(), MetadataMap, "MetaData");
   print(dbgs(), MetadataMap, "MetaData");

+ 1 - 1
lib/CodeGen/CodeGenPrepare.cpp

@@ -2076,7 +2076,7 @@ void ExtAddrMode::print(raw_ostream &OS) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void ExtAddrMode::dump() const {
+LLVM_DUMP_METHOD void ExtAddrMode::dump() const {
   print(dbgs());
   print(dbgs());
   dbgs() << '\n';
   dbgs() << '\n';
 }
 }

+ 1 - 1
lib/CodeGen/LiveDebugVariables.cpp

@@ -1033,7 +1033,7 @@ bool LiveDebugVariables::doInitialization(Module &M) {
 }
 }
 
 
 #ifndef NDEBUG
 #ifndef NDEBUG
-void LiveDebugVariables::dump() {
+LLVM_DUMP_METHOD void LiveDebugVariables::dump() {
   if (pImpl)
   if (pImpl)
     static_cast<LDVImpl*>(pImpl)->print(dbgs());
     static_cast<LDVImpl*>(pImpl)->print(dbgs());
 }
 }

+ 4 - 5
lib/CodeGen/LiveInterval.cpp

@@ -1025,7 +1025,7 @@ raw_ostream& llvm::operator<<(raw_ostream& os, const LiveRange::Segment &S) {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void LiveRange::Segment::dump() const {
+LLVM_DUMP_METHOD void LiveRange::Segment::dump() const {
   dbgs() << *this << "\n";
   dbgs() << *this << "\n";
 }
 }
 #endif
 #endif
@@ -1070,11 +1070,11 @@ void LiveInterval::print(raw_ostream &OS) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void LiveRange::dump() const {
+LLVM_DUMP_METHOD void LiveRange::dump() const {
   dbgs() << *this << "\n";
   dbgs() << *this << "\n";
 }
 }
 
 
-void LiveInterval::dump() const {
+LLVM_DUMP_METHOD void LiveInterval::dump() const {
   dbgs() << *this << "\n";
   dbgs() << *this << "\n";
 }
 }
 #endif
 #endif
@@ -1172,8 +1172,7 @@ void LiveRangeUpdater::print(raw_ostream &OS) const {
   OS << '\n';
   OS << '\n';
 }
 }
 
 
-void LiveRangeUpdater::dump() const
-{
+LLVM_DUMP_METHOD void LiveRangeUpdater::dump() const {
   print(errs());
   print(errs());
 }
 }
 
 

+ 1 - 1
lib/CodeGen/LivePhysRegs.cpp

@@ -120,7 +120,7 @@ void LivePhysRegs::print(raw_ostream &OS) const {
 }
 }
 
 
 /// Dumps the currently live registers to the debug output.
 /// Dumps the currently live registers to the debug output.
-void LivePhysRegs::dump() const {
+LLVM_DUMP_METHOD void LivePhysRegs::dump() const {
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   dbgs() << "  " << *this;
   dbgs() << "  " << *this;
 #endif
 #endif

+ 1 - 1
lib/CodeGen/LiveVariables.cpp

@@ -64,7 +64,7 @@ LiveVariables::VarInfo::findKill(const MachineBasicBlock *MBB) const {
   return nullptr;
   return nullptr;
 }
 }
 
 
-void LiveVariables::VarInfo::dump() const {
+LLVM_DUMP_METHOD void LiveVariables::VarInfo::dump() const {
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   dbgs() << "  Alive in blocks: ";
   dbgs() << "  Alive in blocks: ";
   for (SparseBitVector<>::iterator I = AliveBlocks.begin(),
   for (SparseBitVector<>::iterator I = AliveBlocks.begin(),

+ 1 - 1
lib/CodeGen/MachineBasicBlock.cpp

@@ -217,7 +217,7 @@ bool MachineBasicBlock::hasEHPadSuccessor() const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MachineBasicBlock::dump() const {
+LLVM_DUMP_METHOD void MachineBasicBlock::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 3 - 3
lib/CodeGen/MachineFunction.cpp

@@ -358,7 +358,7 @@ const char *MachineFunction::createExternalSymbolName(StringRef Name) {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MachineFunction::dump() const {
+LLVM_DUMP_METHOD void MachineFunction::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif
@@ -819,7 +819,7 @@ void MachineJumpTableInfo::print(raw_ostream &OS) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MachineJumpTableInfo::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD void MachineJumpTableInfo::dump() const { print(dbgs()); }
 #endif
 #endif
 
 
 
 
@@ -966,5 +966,5 @@ void MachineConstantPool::print(raw_ostream &OS) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MachineConstantPool::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD void MachineConstantPool::dump() const { print(dbgs()); }
 #endif
 #endif

+ 1 - 1
lib/CodeGen/MachineInstr.cpp

@@ -1607,7 +1607,7 @@ void MachineInstr::copyImplicitOps(MachineFunction &MF,
   }
   }
 }
 }
 
 
-void MachineInstr::dump() const {
+LLVM_DUMP_METHOD void MachineInstr::dump() const {
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   dbgs() << "  " << *this;
   dbgs() << "  " << *this;
 #endif
 #endif

+ 1 - 1
lib/CodeGen/MachineLoopInfo.cpp

@@ -77,7 +77,7 @@ MachineBasicBlock *MachineLoop::getBottomBlock() {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MachineLoop::dump() const {
+LLVM_DUMP_METHOD void MachineLoop::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 1 - 1
lib/CodeGen/MachineRegionInfo.cpp

@@ -113,7 +113,7 @@ void MachineRegionInfoPass::print(raw_ostream &OS, const Module *) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MachineRegionInfoPass::dump() const {
+LLVM_DUMP_METHOD void MachineRegionInfoPass::dump() const {
   RI.dump();
   RI.dump();
 }
 }
 #endif
 #endif

+ 1 - 1
lib/CodeGen/RegAllocPBQP.cpp

@@ -839,7 +839,7 @@ void PBQP::RegAlloc::PBQPRAGraph::dump(raw_ostream &OS) const {
   }
   }
 }
 }
 
 
-void PBQP::RegAlloc::PBQPRAGraph::dump() const { dump(dbgs()); }
+LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump() const { dump(dbgs()); }
 
 
 void PBQP::RegAlloc::PBQPRAGraph::printDot(raw_ostream &OS) const {
 void PBQP::RegAlloc::PBQPRAGraph::printDot(raw_ostream &OS) const {
   OS << "graph {\n";
   OS << "graph {\n";

+ 1 - 1
lib/CodeGen/ScoreboardHazardRecognizer.cpp

@@ -91,7 +91,7 @@ void ScoreboardHazardRecognizer::Reset() {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void ScoreboardHazardRecognizer::Scoreboard::dump() const {
+LLVM_DUMP_METHOD void ScoreboardHazardRecognizer::Scoreboard::dump() const {
   dbgs() << "Scoreboard:\n";
   dbgs() << "Scoreboard:\n";
 
 
   unsigned last = Depth - 1;
   unsigned last = Depth - 1;

+ 2 - 2
lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp

@@ -378,7 +378,7 @@ static Printable PrintNodeId(const SDNode &Node) {
   });
   });
 }
 }
 
 
-void SDNode::dump() const { dump(nullptr); }
+LLVM_DUMP_METHOD void SDNode::dump() const { dump(nullptr); }
 void SDNode::dump(const SelectionDAG *G) const {
 void SDNode::dump(const SelectionDAG *G) const {
   print(dbgs(), G);
   print(dbgs(), G);
   dbgs() << '\n';
   dbgs() << '\n';
@@ -590,7 +590,7 @@ static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) {
   N->dump(G);
   N->dump(G);
 }
 }
 
 
-void SelectionDAG::dump() const {
+LLVM_DUMP_METHOD void SelectionDAG::dump() const {
   dbgs() << "SelectionDAG has " << AllNodes.size() << " nodes:\n";
   dbgs() << "SelectionDAG has " << AllNodes.size() << " nodes:\n";
 
 
   for (allnodes_const_iterator I = allnodes_begin(), E = allnodes_end();
   for (allnodes_const_iterator I = allnodes_begin(), E = allnodes_end();

+ 2 - 2
lib/CodeGen/SlotIndexes.cpp

@@ -214,7 +214,7 @@ void SlotIndexes::repairIndexesInRange(MachineBasicBlock *MBB,
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void SlotIndexes::dump() const {
+LLVM_DUMP_METHOD void SlotIndexes::dump() const {
   for (IndexList::const_iterator itr = indexList.begin();
   for (IndexList::const_iterator itr = indexList.begin();
        itr != indexList.end(); ++itr) {
        itr != indexList.end(); ++itr) {
     dbgs() << itr->getIndex() << " ";
     dbgs() << itr->getIndex() << " ";
@@ -242,7 +242,7 @@ void SlotIndex::print(raw_ostream &os) const {
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 // Dump a SlotIndex to stderr.
 // Dump a SlotIndex to stderr.
-void SlotIndex::dump() const {
+LLVM_DUMP_METHOD void SlotIndex::dump() const {
   print(dbgs());
   print(dbgs());
   dbgs() << "\n";
   dbgs() << "\n";
 }
 }

+ 1 - 1
lib/CodeGen/SplitKit.cpp

@@ -347,7 +347,7 @@ void SplitEditor::reset(LiveRangeEdit &LRE, ComplementSpillMode SM) {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void SplitEditor::dump() const {
+LLVM_DUMP_METHOD void SplitEditor::dump() const {
   if (RegAssign.empty()) {
   if (RegAssign.empty()) {
     dbgs() << " empty\n";
     dbgs() << " empty\n";
     return;
     return;

+ 1 - 1
lib/CodeGen/StackColoring.cpp

@@ -194,7 +194,7 @@ void StackColoring::getAnalysisUsage(AnalysisUsage &AU) const {
   MachineFunctionPass::getAnalysisUsage(AU);
   MachineFunctionPass::getAnalysisUsage(AU);
 }
 }
 
 
-void StackColoring::dump() const {
+LLVM_DUMP_METHOD void StackColoring::dump() const {
   for (MachineBasicBlock *MBB : depth_first(MF)) {
   for (MachineBasicBlock *MBB : depth_first(MF)) {
     DEBUG(dbgs() << "Inspecting block #" << BasicBlocks.lookup(MBB) << " ["
     DEBUG(dbgs() << "Inspecting block #" << BasicBlocks.lookup(MBB) << " ["
                  << MBB->getName() << "]\n");
                  << MBB->getName() << "]\n");

+ 1 - 1
lib/CodeGen/VirtRegMap.cpp

@@ -139,7 +139,7 @@ void VirtRegMap::print(raw_ostream &OS, const Module*) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void VirtRegMap::dump() const {
+LLVM_DUMP_METHOD void VirtRegMap::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 2 - 2
lib/IR/Attributes.cpp

@@ -599,7 +599,7 @@ uint64_t AttributeSetImpl::Raw(unsigned Index) const {
   return 0;
   return 0;
 }
 }
 
 
-void AttributeSetImpl::dump() const {
+LLVM_DUMP_METHOD void AttributeSetImpl::dump() const {
   AttributeSet(const_cast<AttributeSetImpl *>(this)).dump();
   AttributeSet(const_cast<AttributeSetImpl *>(this)).dump();
 }
 }
 
 
@@ -1102,7 +1102,7 @@ uint64_t AttributeSet::Raw(unsigned Index) const {
   return pImpl ? pImpl->Raw(Index) : 0;
   return pImpl ? pImpl->Raw(Index) : 0;
 }
 }
 
 
-void AttributeSet::dump() const {
+LLVM_DUMP_METHOD void AttributeSet::dump() const {
   dbgs() << "PAL[\n";
   dbgs() << "PAL[\n";
 
 
   for (unsigned i = 0, e = getNumSlots(); i < e; ++i) {
   for (unsigned i = 0, e = getNumSlots(); i < e; ++i) {

+ 1 - 1
lib/IR/ConstantRange.cpp

@@ -819,6 +819,6 @@ void ConstantRange::print(raw_ostream &OS) const {
 
 
 /// dump - Allow printing from a debugger easily...
 /// dump - Allow printing from a debugger easily...
 ///
 ///
-void ConstantRange::dump() const {
+LLVM_DUMP_METHOD void ConstantRange::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }

+ 1 - 1
lib/IR/DebugLoc.cpp

@@ -67,7 +67,7 @@ DebugLoc DebugLoc::get(unsigned Line, unsigned Col, const MDNode *Scope,
                          const_cast<MDNode *>(InlinedAt));
                          const_cast<MDNode *>(InlinedAt));
 }
 }
 
 
-void DebugLoc::dump() const {
+LLVM_DUMP_METHOD void DebugLoc::dump() const {
 #ifndef NDEBUG
 #ifndef NDEBUG
   if (!Loc)
   if (!Loc)
     return;
     return;

+ 3 - 3
lib/IR/GCOV.cpp

@@ -104,7 +104,7 @@ bool GCOVFile::readGCDA(GCOVBuffer &Buffer) {
 }
 }
 
 
 /// dump - Dump GCOVFile content to dbgs() for debugging purposes.
 /// 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)
   for (const auto &FPtr : Functions)
     FPtr->dump();
     FPtr->dump();
 }
 }
@@ -340,7 +340,7 @@ uint64_t GCOVFunction::getExitCount() const {
 }
 }
 
 
 /// dump - Dump GCOVFunction content to dbgs() for debugging purposes.
 /// dump - Dump GCOVFunction content to dbgs() for debugging purposes.
-void GCOVFunction::dump() const {
+LLVM_DUMP_METHOD void GCOVFunction::dump() const {
   dbgs() << "===== " << Name << " (" << Ident << ") @ " << Filename << ":"
   dbgs() << "===== " << Name << " (" << Ident << ") @ " << Filename << ":"
          << LineNumber << "\n";
          << LineNumber << "\n";
   for (const auto &Block : Blocks)
   for (const auto &Block : Blocks)
@@ -397,7 +397,7 @@ void GCOVBlock::collectLineCounts(FileInfo &FI) {
 }
 }
 
 
 /// dump - Dump GCOVBlock content to dbgs() for debugging purposes.
 /// 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";
   dbgs() << "Block : " << Number << " Counter : " << Counter << "\n";
   if (!SrcEdges.empty()) {
   if (!SrcEdges.empty()) {
     dbgs() << "\tSource Edges : ";
     dbgs() << "\tSource Edges : ";

+ 1 - 1
lib/IR/LegacyPassManager.cpp

@@ -1827,7 +1827,7 @@ void PMStack::push(PMDataManager *PM) {
 }
 }
 
 
 // Dump content of the pass manager stack.
 // Dump content of the pass manager stack.
-void PMStack::dump() const {
+LLVM_DUMP_METHOD void PMStack::dump() const {
   for (PMDataManager *Manager : S)
   for (PMDataManager *Manager : S)
     dbgs() << Manager->getAsPass()->getPassName() << ' ';
     dbgs() << Manager->getAsPass()->getPassName() << ' ';
 
 

+ 1 - 1
lib/IR/Pass.cpp

@@ -113,7 +113,7 @@ void Pass::print(raw_ostream &O,const Module*) const {
 }
 }
 
 
 // dump - call print(cerr);
 // dump - call print(cerr);
-void Pass::dump() const {
+LLVM_DUMP_METHOD void Pass::dump() const {
   print(dbgs(), nullptr);
   print(dbgs(), nullptr);
 }
 }
 
 

+ 1 - 1
lib/IR/ValueSymbolTable.cpp

@@ -97,7 +97,7 @@ ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) {
 
 
 // dump - print out the symbol table
 // dump - print out the symbol table
 //
 //
-void ValueSymbolTable::dump() const {
+LLVM_DUMP_METHOD void ValueSymbolTable::dump() const {
   //DEBUG(dbgs() << "ValueSymbolTable:\n");
   //DEBUG(dbgs() << "ValueSymbolTable:\n");
   for (const_iterator I = begin(), E = end(); I != E; ++I) {
   for (const_iterator I = begin(), E = end(); I != E; ++I) {
     //DEBUG(dbgs() << "  '" << I->getKeyData() << "' = ");
     //DEBUG(dbgs() << "  '" << I->getKeyData() << "' = ");

+ 1 - 1
lib/MC/MCExpr.cpp

@@ -129,7 +129,7 @@ void MCExpr::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCExpr::dump() const {
+LLVM_DUMP_METHOD void MCExpr::dump() const {
   dbgs() << *this;
   dbgs() << *this;
   dbgs() << '\n';
   dbgs() << '\n';
 }
 }

+ 2 - 2
lib/MC/MCFragment.cpp

@@ -311,7 +311,7 @@ raw_ostream &operator<<(raw_ostream &OS, const MCFixup &AF) {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCFragment::dump() {
+LLVM_DUMP_METHOD void MCFragment::dump() {
   raw_ostream &OS = llvm::errs();
   raw_ostream &OS = llvm::errs();
 
 
   OS << "<";
   OS << "<";
@@ -433,7 +433,7 @@ void MCFragment::dump() {
   OS << ">";
   OS << ">";
 }
 }
 
 
-void MCAssembler::dump() {
+LLVM_DUMP_METHOD void MCAssembler::dump() {
   raw_ostream &OS = llvm::errs();
   raw_ostream &OS = llvm::errs();
 
 
   OS << "<MCAssembler\n";
   OS << "<MCAssembler\n";

+ 2 - 2
lib/MC/MCInst.cpp

@@ -35,7 +35,7 @@ void MCOperand::print(raw_ostream &OS) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCOperand::dump() const {
+LLVM_DUMP_METHOD void MCOperand::dump() const {
   print(dbgs());
   print(dbgs());
   dbgs() << "\n";
   dbgs() << "\n";
 }
 }
@@ -66,7 +66,7 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer,
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCInst::dump() const {
+LLVM_DUMP_METHOD void MCInst::dump() const {
   print(dbgs());
   print(dbgs());
   dbgs() << "\n";
   dbgs() << "\n";
 }
 }

+ 1 - 1
lib/MC/MCLabel.cpp

@@ -17,7 +17,7 @@ void MCLabel::print(raw_ostream &OS) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCLabel::dump() const {
+LLVM_DUMP_METHOD void MCLabel::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 1 - 1
lib/MC/MCParser/MCAsmParser.cpp

@@ -43,7 +43,7 @@ bool MCAsmParser::parseExpression(const MCExpr *&Res) {
   return parseExpression(Res, L);
   return parseExpression(Res, L);
 }
 }
 
 
-void MCParsedAsmOperand::dump() const {
+LLVM_DUMP_METHOD void MCParsedAsmOperand::dump() const {
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   dbgs() << "  " << *this;
   dbgs() << "  " << *this;
 #endif
 #endif

+ 1 - 1
lib/MC/MCSection.cpp

@@ -86,7 +86,7 @@ MCSection::getSubsectionInsertionPoint(unsigned Subsection) {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCSection::dump() {
+LLVM_DUMP_METHOD void MCSection::dump() {
   raw_ostream &OS = llvm::errs();
   raw_ostream &OS = llvm::errs();
 
 
   OS << "<MCSection";
   OS << "<MCSection";

+ 1 - 1
lib/MC/MCSymbol.cpp

@@ -77,5 +77,5 @@ void MCSymbol::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCSymbol::dump() const { dbgs() << *this; }
+LLVM_DUMP_METHOD void MCSymbol::dump() const { dbgs() << *this; }
 #endif
 #endif

+ 1 - 1
lib/MC/MCValue.cpp

@@ -38,7 +38,7 @@ void MCValue::print(raw_ostream &OS) const {
 }
 }
 
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCValue::dump() const {
+LLVM_DUMP_METHOD void MCValue::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 1 - 1
lib/MC/SubtargetFeature.cpp

@@ -284,7 +284,7 @@ void SubtargetFeatures::print(raw_ostream &OS) const {
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 /// dump - Dump feature info.
 /// dump - Dump feature info.
 ///
 ///
-void SubtargetFeatures::dump() const {
+LLVM_DUMP_METHOD void SubtargetFeatures::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 #endif
 #endif

+ 1 - 1
lib/Option/Option.cpp

@@ -82,7 +82,7 @@ void Option::print(raw_ostream &O) const {
   O << ">\n";
   O << ">\n";
 }
 }
 
 
-void Option::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD void Option::dump() const { print(dbgs()); }
 
 
 bool Option::matches(OptSpecifier Opt) const {
 bool Option::matches(OptSpecifier Opt) const {
   // Aliases are never considered in matching, look through them.
   // Aliases are never considered in matching, look through them.

+ 3 - 3
lib/ProfileData/SampleProf.cpp

@@ -71,14 +71,14 @@ raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS,
   return OS;
   return OS;
 }
 }
 
 
-void LineLocation::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD void LineLocation::dump() const { print(dbgs()); }
 
 
 void CallsiteLocation::print(raw_ostream &OS) const {
 void CallsiteLocation::print(raw_ostream &OS) const {
   LineLocation::print(OS);
   LineLocation::print(OS);
   OS << ": inlined callee: " << CalleeName;
   OS << ": inlined callee: " << CalleeName;
 }
 }
 
 
-void CallsiteLocation::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD void CallsiteLocation::dump() const { print(dbgs()); }
 
 
 inline raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS,
 inline raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS,
                                                  const CallsiteLocation &Loc) {
                                                  const CallsiteLocation &Loc) {
@@ -97,7 +97,7 @@ void SampleRecord::print(raw_ostream &OS, unsigned Indent) const {
   OS << "\n";
   OS << "\n";
 }
 }
 
 
-void SampleRecord::dump() const { print(dbgs(), 0); }
+LLVM_DUMP_METHOD void SampleRecord::dump() const { print(dbgs(), 0); }
 
 
 raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS,
 raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS,
                                           const SampleRecord &Sample) {
                                           const SampleRecord &Sample) {

+ 1 - 1
lib/Support/APInt.cpp

@@ -2268,7 +2268,7 @@ std::string APInt::toString(unsigned Radix = 10, bool Signed = true) const {
 }
 }
 
 
 
 
-void APInt::dump() const {
+LLVM_DUMP_METHOD void APInt::dump() const {
   SmallString<40> S, U;
   SmallString<40> S, U;
   this->toStringUnsigned(U);
   this->toStringUnsigned(U);
   this->toStringSigned(S);
   this->toStringSigned(S);

+ 1 - 1
lib/Support/BranchProbability.cpp

@@ -32,7 +32,7 @@ raw_ostream &BranchProbability::print(raw_ostream &OS) const {
                       Percent);
                       Percent);
 }
 }
 
 
-void BranchProbability::dump() const { print(dbgs()) << '\n'; }
+LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; }
 
 
 BranchProbability::BranchProbability(uint32_t Numerator, uint32_t Denominator) {
 BranchProbability::BranchProbability(uint32_t Numerator, uint32_t Denominator) {
   assert(Denominator > 0 && "Denominator cannot be 0!");
   assert(Denominator > 0 && "Denominator cannot be 0!");

+ 1 - 1
lib/Support/Twine.cpp

@@ -161,7 +161,7 @@ void Twine::printRepr(raw_ostream &OS) const {
   OS << ")";
   OS << ")";
 }
 }
 
 
-void Twine::dump() const {
+LLVM_DUMP_METHOD void Twine::dump() const {
   print(dbgs());
   print(dbgs());
 }
 }
 
 

+ 6 - 6
lib/TableGen/Record.cpp

@@ -86,7 +86,7 @@ IntRecTy IntRecTy::Shared;
 StringRecTy StringRecTy::Shared;
 StringRecTy StringRecTy::Shared;
 DagRecTy DagRecTy::Shared;
 DagRecTy DagRecTy::Shared;
 
 
-void RecTy::dump() const { print(errs()); }
+LLVM_DUMP_METHOD void RecTy::dump() const { print(errs()); }
 
 
 ListRecTy *RecTy::getListTy() {
 ListRecTy *RecTy::getListTy() {
   if (!ListTy)
   if (!ListTy)
@@ -211,7 +211,7 @@ RecTy *llvm::resolveTypes(RecTy *T1, RecTy *T2) {
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//
 
 
 void Init::anchor() { }
 void Init::anchor() { }
-void Init::dump() const { return print(errs()); }
+LLVM_DUMP_METHOD void Init::dump() const { return print(errs()); }
 
 
 UnsetInit *UnsetInit::get() {
 UnsetInit *UnsetInit::get() {
   static UnsetInit TheInit;
   static UnsetInit TheInit;
@@ -1597,7 +1597,7 @@ const std::string &RecordVal::getName() const {
   return cast<StringInit>(getNameInit())->getValue();
   return cast<StringInit>(getNameInit())->getValue();
 }
 }
 
 
-void RecordVal::dump() const { errs() << *this; }
+LLVM_DUMP_METHOD void RecordVal::dump() const { errs() << *this; }
 
 
 void RecordVal::print(raw_ostream &OS, bool PrintSem) const {
 void RecordVal::print(raw_ostream &OS, bool PrintSem) const {
   if (getPrefix()) OS << "field ";
   if (getPrefix()) OS << "field ";
@@ -1682,7 +1682,7 @@ void Record::resolveReferencesTo(const RecordVal *RV) {
   }
   }
 }
 }
 
 
-void Record::dump() const { errs() << *this; }
+LLVM_DUMP_METHOD void Record::dump() const { errs() << *this; }
 
 
 raw_ostream &llvm::operator<<(raw_ostream &OS, const Record &R) {
 raw_ostream &llvm::operator<<(raw_ostream &OS, const Record &R) {
   OS << R.getNameInitAsString();
   OS << R.getNameInitAsString();
@@ -1916,7 +1916,7 @@ DagInit *Record::getValueAsDag(StringRef FieldName) const {
 }
 }
 
 
 
 
-void MultiClass::dump() const {
+LLVM_DUMP_METHOD void MultiClass::dump() const {
   errs() << "Record:\n";
   errs() << "Record:\n";
   Rec.dump();
   Rec.dump();
 
 
@@ -1926,7 +1926,7 @@ void MultiClass::dump() const {
 }
 }
 
 
 
 
-void RecordKeeper::dump() const { errs() << *this; }
+LLVM_DUMP_METHOD void RecordKeeper::dump() const { errs() << *this; }
 
 
 raw_ostream &llvm::operator<<(raw_ostream &OS, const RecordKeeper &RK) {
 raw_ostream &llvm::operator<<(raw_ostream &OS, const RecordKeeper &RK) {
   OS << "------------- Classes -----------------\n";
   OS << "------------- Classes -----------------\n";

+ 1 - 1
lib/TableGen/TGParser.cpp

@@ -45,7 +45,7 @@ struct SubMultiClassReference {
   void dump() const;
   void dump() const;
 };
 };
 
 
-void SubMultiClassReference::dump() const {
+LLVM_DUMP_METHOD void SubMultiClassReference::dump() const {
   errs() << "Multiclass:\n";
   errs() << "Multiclass:\n";
 
 
   MC->dump();
   MC->dump();

+ 1 - 1
lib/Target/ARM/ARMConstantPoolValue.cpp

@@ -85,7 +85,7 @@ ARMConstantPoolValue::hasSameValue(ARMConstantPoolValue *ACPV) {
   return false;
   return false;
 }
 }
 
 
-void ARMConstantPoolValue::dump() const {
+LLVM_DUMP_METHOD void ARMConstantPoolValue::dump() const {
   errs() << "  " << *this;
   errs() << "  " << *this;
 }
 }