From d34e60ca8532511acb8c93ef26297e349fbec86a Mon Sep 17 00:00:00 2001 From: Nicola Zaghen Date: Mon, 14 May 2018 12:53:11 +0000 Subject: Rename DEBUG macro to LLVM_DEBUG. The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM - Manual change to APInt - Manually chage DOCS as regex doesn't match it. In the transition period the DEBUG() macro is still present and aliased to the LLVM_DEBUG() one. Differential Revision: https://reviews.llvm.org/D43624 llvm-svn: 332240 --- llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp') diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp index ac0793d..b3c2b182 100644 --- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp @@ -346,7 +346,7 @@ class SegmentBuilder { else Segments.emplace_back(StartLoc.first, StartLoc.second, IsRegionEntry); - DEBUG({ + LLVM_DEBUG({ const auto &Last = Segments.back(); dbgs() << "Segment at " << Last.Line << ":" << Last.Col << " (count = " << Last.Count << ")" @@ -524,7 +524,7 @@ public: sortNestedRegions(Regions); ArrayRef CombinedRegions = combineRegions(Regions); - DEBUG({ + LLVM_DEBUG({ dbgs() << "Combined regions:\n"; for (const auto &CR : CombinedRegions) dbgs() << " " << CR.LineStart << ":" << CR.ColumnStart << " -> " @@ -539,8 +539,8 @@ public: const auto &L = Segments[I - 1]; const auto &R = Segments[I]; if (!(L.Line < R.Line) && !(L.Line == R.Line && L.Col < R.Col)) { - DEBUG(dbgs() << " ! Segment " << L.Line << ":" << L.Col - << " followed by " << R.Line << ":" << R.Col << "\n"); + LLVM_DEBUG(dbgs() << " ! Segment " << L.Line << ":" << L.Col + << " followed by " << R.Line << ":" << R.Col << "\n"); assert(false && "Coverage segments not unique or sorted"); } } @@ -613,7 +613,7 @@ CoverageData CoverageMapping::getCoverageForFile(StringRef Filename) const { } } - DEBUG(dbgs() << "Emitting segments for file: " << Filename << "\n"); + LLVM_DEBUG(dbgs() << "Emitting segments for file: " << Filename << "\n"); FileCoverage.Segments = SegmentBuilder::buildSegments(Regions); return FileCoverage; @@ -654,7 +654,8 @@ CoverageMapping::getCoverageForFunction(const FunctionRecord &Function) const { FunctionCoverage.Expansions.emplace_back(CR, Function); } - DEBUG(dbgs() << "Emitting segments for function: " << Function.Name << "\n"); + LLVM_DEBUG(dbgs() << "Emitting segments for function: " << Function.Name + << "\n"); FunctionCoverage.Segments = SegmentBuilder::buildSegments(Regions); return FunctionCoverage; @@ -672,8 +673,8 @@ CoverageData CoverageMapping::getCoverageForExpansion( ExpansionCoverage.Expansions.emplace_back(CR, Expansion.Function); } - DEBUG(dbgs() << "Emitting segments for expansion of file " << Expansion.FileID - << "\n"); + LLVM_DEBUG(dbgs() << "Emitting segments for expansion of file " + << Expansion.FileID << "\n"); ExpansionCoverage.Segments = SegmentBuilder::buildSegments(Regions); return ExpansionCoverage; -- cgit v1.1