diff options
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MC/MCFragment.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MC/MCInst.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/MC/MCLabel.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MC/MCParser/MCAsmParser.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/MC/MCSection.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MC/MCSymbol.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/MC/MCValue.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/MC/SubtargetFeature.cpp | 2 |
9 files changed, 25 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index 68e135d5cd6..f312b463d2e 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -129,10 +129,12 @@ void MCExpr::print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens) const { llvm_unreachable("Invalid expression kind!"); } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MCExpr::dump() const { dbgs() << *this; dbgs() << '\n'; } +#endif /* *** */ diff --git a/llvm/lib/MC/MCFragment.cpp b/llvm/lib/MC/MCFragment.cpp index 8f96e06957a..da6ee7a0730 100644 --- a/llvm/lib/MC/MCFragment.cpp +++ b/llvm/lib/MC/MCFragment.cpp @@ -309,6 +309,7 @@ raw_ostream &operator<<(raw_ostream &OS, const MCFixup &AF) { } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MCFragment::dump() { raw_ostream &OS = llvm::errs(); @@ -468,3 +469,4 @@ LLVM_DUMP_METHOD void MCAssembler::dump() { } OS << "]>\n"; } +#endif diff --git a/llvm/lib/MC/MCInst.cpp b/llvm/lib/MC/MCInst.cpp index 2da8ecc4ff6..16bc597cf3a 100644 --- a/llvm/lib/MC/MCInst.cpp +++ b/llvm/lib/MC/MCInst.cpp @@ -34,10 +34,12 @@ void MCOperand::print(raw_ostream &OS) const { OS << ">"; } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MCOperand::dump() const { print(dbgs()); dbgs() << "\n"; } +#endif void MCInst::print(raw_ostream &OS) const { OS << "<MCInst " << getOpcode(); @@ -63,7 +65,9 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer, OS << ">"; } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MCInst::dump() const { print(dbgs()); dbgs() << "\n"; } +#endif diff --git a/llvm/lib/MC/MCLabel.cpp b/llvm/lib/MC/MCLabel.cpp index b443cbbbf43..d973fc93b98 100644 --- a/llvm/lib/MC/MCLabel.cpp +++ b/llvm/lib/MC/MCLabel.cpp @@ -16,6 +16,8 @@ void MCLabel::print(raw_ostream &OS) const { OS << '"' << getInstance() << '"'; } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MCLabel::dump() const { print(dbgs()); } +#endif diff --git a/llvm/lib/MC/MCParser/MCAsmParser.cpp b/llvm/lib/MC/MCParser/MCAsmParser.cpp index be1d7f29ea6..055bf5e8210 100644 --- a/llvm/lib/MC/MCParser/MCAsmParser.cpp +++ b/llvm/lib/MC/MCParser/MCAsmParser.cpp @@ -137,6 +137,9 @@ bool MCAsmParser::parseExpression(const MCExpr *&Res) { return parseExpression(Res, L); } -LLVM_DUMP_METHOD void MCParsedAsmOperand::dump() const { +void MCParsedAsmOperand::dump() const { + // Cannot completely remove virtual function even in release mode. +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) dbgs() << " " << *this; +#endif } diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp index 9064cdf2f31..7a42a2758e8 100644 --- a/llvm/lib/MC/MCSection.cpp +++ b/llvm/lib/MC/MCSection.cpp @@ -85,6 +85,7 @@ MCSection::getSubsectionInsertionPoint(unsigned Subsection) { return IP; } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MCSection::dump() { raw_ostream &OS = llvm::errs(); @@ -97,3 +98,4 @@ LLVM_DUMP_METHOD void MCSection::dump() { } OS << "]>"; } +#endif diff --git a/llvm/lib/MC/MCSymbol.cpp b/llvm/lib/MC/MCSymbol.cpp index 20d985df7ea..ad303ef0218 100644 --- a/llvm/lib/MC/MCSymbol.cpp +++ b/llvm/lib/MC/MCSymbol.cpp @@ -75,4 +75,8 @@ void MCSymbol::print(raw_ostream &OS, const MCAsmInfo *MAI) const { OS << '"'; } -LLVM_DUMP_METHOD void MCSymbol::dump() const { dbgs() << *this; } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +LLVM_DUMP_METHOD void MCSymbol::dump() const { + dbgs() << *this; +} +#endif diff --git a/llvm/lib/MC/MCValue.cpp b/llvm/lib/MC/MCValue.cpp index c1336d6d1b4..32a6adbf224 100644 --- a/llvm/lib/MC/MCValue.cpp +++ b/llvm/lib/MC/MCValue.cpp @@ -37,9 +37,11 @@ void MCValue::print(raw_ostream &OS) const { OS << " + " << getConstant(); } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MCValue::dump() const { print(dbgs()); } +#endif MCSymbolRefExpr::VariantKind MCValue::getAccessVariant() const { const MCSymbolRefExpr *B = getSymB(); diff --git a/llvm/lib/MC/SubtargetFeature.cpp b/llvm/lib/MC/SubtargetFeature.cpp index 32f06f8a7d6..a97cd1db693 100644 --- a/llvm/lib/MC/SubtargetFeature.cpp +++ b/llvm/lib/MC/SubtargetFeature.cpp @@ -282,11 +282,13 @@ void SubtargetFeatures::print(raw_ostream &OS) const { OS << "\n"; } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) /// dump - Dump feature info. /// LLVM_DUMP_METHOD void SubtargetFeatures::dump() const { print(dbgs()); } +#endif /// Adds the default features for the specified target triple. /// |