Release build: guard dump functions with

"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"

No functional change. Update r163344.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163679 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren 2012-09-12 05:06:18 +00:00
parent 0a16da4457
commit 286c4dc355
22 changed files with 30 additions and 30 deletions

View File

@ -590,7 +590,7 @@ void AliasSetTracker::print(raw_ostream &OS) const {
OS << "\n"; OS << "\n";
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void AliasSet::dump() const { print(dbgs()); } void AliasSet::dump() const { print(dbgs()); }
void AliasSetTracker::dump() const { print(dbgs()); } void AliasSetTracker::dump() const { print(dbgs()); }
#endif #endif

View File

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

View File

@ -198,7 +198,7 @@ void CallGraph::print(raw_ostream &OS, Module*) const {
for (CallGraph::const_iterator I = begin(), E = end(); I != E; ++I) for (CallGraph::const_iterator I = begin(), E = end(); I != E; ++I)
I->second->print(OS); I->second->print(OS);
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void CallGraph::dump() const { void CallGraph::dump() const {
print(dbgs(), 0); print(dbgs(), 0);
} }
@ -269,7 +269,7 @@ void CallGraphNode::print(raw_ostream &OS) const {
OS << '\n'; OS << '\n';
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void CallGraphNode::dump() const { print(dbgs()); } void CallGraphNode::dump() const { print(dbgs()); }
#endif #endif

View File

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

View File

@ -974,7 +974,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {
return AlwaysInline || Cost < Threshold; return AlwaysInline || Cost < Threshold;
} }
#ifndef NDEBUG #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() { void CallAnalyzer::dump() {
#define DEBUG_PRINT_STAT(x) llvm::dbgs() << " " #x ": " << x << "\n" #define DEBUG_PRINT_STAT(x) llvm::dbgs() << " " #x ": " << x << "\n"

View File

@ -306,7 +306,7 @@ BasicBlock *Loop::getUniqueExitBlock() const {
return 0; return 0;
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void Loop::dump() const { void Loop::dump() const {
print(dbgs()); print(dbgs());
} }

View File

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

View File

@ -427,7 +427,7 @@ void Region::print(raw_ostream &OS, bool print_tree, unsigned level,
OS.indent(level*2) << "} \n"; OS.indent(level*2) << "} \n";
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void Region::dump() const { void Region::dump() const {
print(dbgs(), true, getDepth(), printStyle.getValue()); print(dbgs(), true, getDepth(), printStyle.getValue());
} }

View File

@ -122,7 +122,7 @@ char ScalarEvolution::ID = 0;
// Implementation of the SCEV class. // Implementation of the SCEV class.
// //
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void SCEV::dump() const { void SCEV::dump() const {
print(dbgs()); print(dbgs());
dbgs() << '\n'; dbgs() << '\n';

View File

@ -43,7 +43,7 @@ void Trace::print(raw_ostream &O) const {
O << "; Trace parent function: \n" << *F; O << "; Trace parent function: \n" << *F;
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// dump - Debugger convenience method; writes trace to standard error /// dump - Debugger convenience method; writes trace to standard error
/// output stream. /// output stream.
/// ///

View File

@ -830,7 +830,7 @@ raw_ostream &operator<<(raw_ostream &OS, const MCFixup &AF) {
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MCFragment::dump() { void MCFragment::dump() {
raw_ostream &OS = llvm::errs(); raw_ostream &OS = llvm::errs();

View File

@ -425,7 +425,7 @@ void MCDwarfFile::print(raw_ostream &OS) const {
OS << '"' << getName() << '"'; OS << '"' << getName() << '"';
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MCDwarfFile::dump() const { void MCDwarfFile::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -136,7 +136,7 @@ void MCExpr::print(raw_ostream &OS) const {
llvm_unreachable("Invalid expression kind!"); llvm_unreachable("Invalid expression kind!");
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MCExpr::dump() const { void MCExpr::dump() const {
print(dbgs()); print(dbgs());
dbgs() << '\n'; dbgs() << '\n';

View File

@ -32,7 +32,7 @@ void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
OS << ">"; OS << ">";
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MCOperand::dump() const { void MCOperand::dump() const {
print(dbgs(), 0); print(dbgs(), 0);
dbgs() << "\n"; dbgs() << "\n";
@ -64,7 +64,7 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCAsmInfo *MAI,
OS << ">"; OS << ">";
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MCInst::dump() const { void MCInst::dump() const {
print(dbgs(), 0); print(dbgs(), 0);
dbgs() << "\n"; dbgs() << "\n";

View File

@ -16,7 +16,7 @@ void MCLabel::print(raw_ostream &OS) const {
OS << '"' << getInstance() << '"'; OS << '"' << getInstance() << '"';
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MCLabel::dump() const { void MCLabel::dump() const {
print(dbgs()); print(dbgs());
} }

View File

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

View File

@ -76,7 +76,7 @@ void MCSymbol::print(raw_ostream &OS) const {
OS << '"' << getName() << '"'; OS << '"' << getName() << '"';
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MCSymbol::dump() const { void MCSymbol::dump() const {
print(dbgs()); print(dbgs());
} }

View File

@ -31,7 +31,7 @@ void MCValue::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
OS << " + " << getConstant(); OS << " + " << getConstant();
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MCValue::dump() const { void MCValue::dump() const {
print(dbgs(), 0); print(dbgs(), 0);
} }

View File

@ -368,7 +368,7 @@ void SubtargetFeatures::print(raw_ostream &OS) const {
OS << "\n"; OS << "\n";
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// dump - Dump feature info. /// dump - Dump feature info.
/// ///
void SubtargetFeatures::dump() const { void SubtargetFeatures::dump() const {

View File

@ -632,7 +632,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfo)
INITIALIZE_AG_DEPENDENCY(AliasAnalysis) INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
INITIALIZE_PASS_END(GVN, "gvn", "Global Value Numbering", false, false) INITIALIZE_PASS_END(GVN, "gvn", "Global Value Numbering", false, false)
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void GVN::dump(DenseMap<uint32_t, Value*>& d) { void GVN::dump(DenseMap<uint32_t, Value*>& d) {
errs() << "{\n"; errs() << "{\n";
for (DenseMap<uint32_t, Value*>::iterator I = d.begin(), for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),

View File

@ -121,7 +121,7 @@ void RegSortData::print(raw_ostream &OS) const {
OS << "[NumUses=" << UsedByIndices.count() << ']'; OS << "[NumUses=" << UsedByIndices.count() << ']';
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void RegSortData::dump() const { void RegSortData::dump() const {
print(errs()); errs() << '\n'; print(errs()); errs() << '\n';
} }
@ -416,7 +416,7 @@ void Formula::print(raw_ostream &OS) const {
} }
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void Formula::dump() const { void Formula::dump() const {
print(errs()); errs() << '\n'; print(errs()); errs() << '\n';
} }
@ -978,7 +978,7 @@ void Cost::print(raw_ostream &OS) const {
OS << ", plus " << SetupCost << " setup cost"; OS << ", plus " << SetupCost << " setup cost";
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void Cost::dump() const { void Cost::dump() const {
print(errs()); errs() << '\n'; print(errs()); errs() << '\n';
} }
@ -1066,7 +1066,7 @@ void LSRFixup::print(raw_ostream &OS) const {
OS << ", Offset=" << Offset; OS << ", Offset=" << Offset;
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void LSRFixup::dump() const { void LSRFixup::dump() const {
print(errs()); errs() << '\n'; print(errs()); errs() << '\n';
} }
@ -1260,7 +1260,7 @@ void LSRUse::print(raw_ostream &OS) const {
OS << ", widest fixup type: " << *WidestFixupType; OS << ", widest fixup type: " << *WidestFixupType;
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void LSRUse::dump() const { void LSRUse::dump() const {
print(errs()); errs() << '\n'; print(errs()); errs() << '\n';
} }
@ -3446,7 +3446,7 @@ void WorkItem::print(raw_ostream &OS) const {
<< " , add offset " << Imm; << " , add offset " << Imm;
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void WorkItem::dump() const { void WorkItem::dump() const {
print(errs()); errs() << '\n'; print(errs()); errs() << '\n';
} }
@ -4743,7 +4743,7 @@ void LSRInstance::print(raw_ostream &OS) const {
print_uses(OS); print_uses(OS);
} }
#ifndef NDEBUG #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void LSRInstance::dump() const { void LSRInstance::dump() const {
print(errs()); errs() << '\n'; print(errs()); errs() << '\n';
} }

View File

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