diff options
author | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-14 12:53:11 +0000 |
---|---|---|
committer | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-14 12:53:11 +0000 |
commit | d34e60ca8532511acb8c93ef26297e349fbec86a (patch) | |
tree | 1a095bc8694498d94232e81b95c1da05d462d3ec /llvm/lib/CodeGen/SafeStackLayout.cpp | |
parent | affbc99bea94e77f7ebccd8ba887e33051bd04ee (diff) | |
download | llvm-d34e60ca8532511acb8c93ef26297e349fbec86a.zip llvm-d34e60ca8532511acb8c93ef26297e349fbec86a.tar.gz llvm-d34e60ca8532511acb8c93ef26297e349fbec86a.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/CodeGen/SafeStackLayout.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SafeStackLayout.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/SafeStackLayout.cpp b/llvm/lib/CodeGen/SafeStackLayout.cpp index 68ccdc27..07b6a5d 100644 --- a/llvm/lib/CodeGen/SafeStackLayout.cpp +++ b/llvm/lib/CodeGen/SafeStackLayout.cpp @@ -63,30 +63,30 @@ void StackLayout::layoutObject(StackObject &Obj) { return; } - DEBUG(dbgs() << "Layout: size " << Obj.Size << ", align " << Obj.Alignment - << ", range " << Obj.Range << "\n"); + LLVM_DEBUG(dbgs() << "Layout: size " << Obj.Size << ", align " + << Obj.Alignment << ", range " << Obj.Range << "\n"); assert(Obj.Alignment <= MaxAlignment); unsigned Start = AdjustStackOffset(0, Obj.Size, Obj.Alignment); unsigned End = Start + Obj.Size; - DEBUG(dbgs() << " First candidate: " << Start << " .. " << End << "\n"); + LLVM_DEBUG(dbgs() << " First candidate: " << Start << " .. " << End << "\n"); for (const StackRegion &R : Regions) { - DEBUG(dbgs() << " Examining region: " << R.Start << " .. " << R.End - << ", range " << R.Range << "\n"); + LLVM_DEBUG(dbgs() << " Examining region: " << R.Start << " .. " << R.End + << ", range " << R.Range << "\n"); assert(End >= R.Start); if (Start >= R.End) { - DEBUG(dbgs() << " Does not intersect, skip.\n"); + LLVM_DEBUG(dbgs() << " Does not intersect, skip.\n"); continue; } if (Obj.Range.Overlaps(R.Range)) { // Find the next appropriate location. Start = AdjustStackOffset(R.End, Obj.Size, Obj.Alignment); End = Start + Obj.Size; - DEBUG(dbgs() << " Overlaps. Next candidate: " << Start << " .. " << End - << "\n"); + LLVM_DEBUG(dbgs() << " Overlaps. Next candidate: " << Start << " .. " + << End << "\n"); continue; } if (End <= R.End) { - DEBUG(dbgs() << " Reusing region(s).\n"); + LLVM_DEBUG(dbgs() << " Reusing region(s).\n"); break; } } @@ -95,13 +95,13 @@ void StackLayout::layoutObject(StackObject &Obj) { if (End > LastRegionEnd) { // Insert a new region at the end. Maybe two. if (Start > LastRegionEnd) { - DEBUG(dbgs() << " Creating gap region: " << LastRegionEnd << " .. " - << Start << "\n"); + LLVM_DEBUG(dbgs() << " Creating gap region: " << LastRegionEnd << " .. " + << Start << "\n"); Regions.emplace_back(LastRegionEnd, Start, StackColoring::LiveRange()); LastRegionEnd = Start; } - DEBUG(dbgs() << " Creating new region: " << LastRegionEnd << " .. " << End - << ", range " << Obj.Range << "\n"); + LLVM_DEBUG(dbgs() << " Creating new region: " << LastRegionEnd << " .. " + << End << ", range " << Obj.Range << "\n"); Regions.emplace_back(LastRegionEnd, End, Obj.Range); LastRegionEnd = End; } @@ -150,5 +150,5 @@ void StackLayout::computeLayout() { for (auto &Obj : StackObjects) layoutObject(Obj); - DEBUG(print(dbgs())); + LLVM_DEBUG(print(dbgs())); } |