aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFrameInfo.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2020-04-06 10:08:22 +0000
committerGuillaume Chatelet <gchatelet@google.com>2020-04-06 12:09:45 +0000
commitff858d77810a5565a1f668c8e900a5e8659817be (patch)
tree4d4a0e31df5d04cddc441b32a1a8989353d0d3db /llvm/lib/CodeGen/MachineFrameInfo.cpp
parent39cfba9e333ce41b67c605173de9bf1575328b8a (diff)
downloadllvm-ff858d77810a5565a1f668c8e900a5e8659817be.zip
llvm-ff858d77810a5565a1f668c8e900a5e8659817be.tar.gz
llvm-ff858d77810a5565a1f668c8e900a5e8659817be.tar.bz2
[Alignment][NFC] Add DebugStr and operator*
Summary: This is a roll forward of D77394 minus AlignmentFromAssumptions (which needs to be addressed separately) Differences from D77394: - DebugStr() now prints the alignment value or `None` and no more `Align(x)` or `MaybeAlign(x)` - This is to keep Warning message consistent (CodeGen/SystemZ/alloca-04.ll) - Removed a few unneeded headers from Alignment (since it's included everywhere it's better to keep the dependencies to a minimum) Reviewers: courbet Subscribers: sdardis, hiraditya, jrtc27, atanasyan, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77537
Diffstat (limited to 'llvm/lib/CodeGen/MachineFrameInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFrameInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFrameInfo.cpp b/llvm/lib/CodeGen/MachineFrameInfo.cpp
index 7690505..7ba27ff 100644
--- a/llvm/lib/CodeGen/MachineFrameInfo.cpp
+++ b/llvm/lib/CodeGen/MachineFrameInfo.cpp
@@ -41,8 +41,9 @@ static inline Align clampStackAlignment(bool ShouldClamp, Align Alignment,
Align StackAlignment) {
if (!ShouldClamp || Alignment <= StackAlignment)
return Alignment;
- LLVM_DEBUG(dbgs() << "Warning: requested alignment " << Alignment.value()
- << " exceeds the stack alignment " << StackAlignment.value()
+ LLVM_DEBUG(dbgs() << "Warning: requested alignment " << DebugStr(Alignment)
+ << " exceeds the stack alignment "
+ << DebugStr(StackAlignment)
<< " when stack realignment is off" << '\n');
return StackAlignment;
}