aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-06-22 09:55:20 -0700
committerFangrui Song <i@maskray.me>2021-06-22 09:55:20 -0700
commitf53d791520d85c5404381ff3ad92cb918256029d (patch)
tree385bfc379a8c72a48012e552fc3b06cee0099613 /llvm/lib/CodeGen/PrologEpilogInserter.cpp
parent40d6d2c49dd16641a6fd40916e1cc9a58513ed15 (diff)
downloadllvm-f53d791520d85c5404381ff3ad92cb918256029d.zip
llvm-f53d791520d85c5404381ff3ad92cb918256029d.tar.gz
llvm-f53d791520d85c5404381ff3ad92cb918256029d.tar.bz2
Improve the diagnostic of DiagnosticInfoResourceLimit (and warn-stack-size in particular)
Before: `warning: stack size limit exceeded (888) in main` After: `warning: stack frame size (888) exceeds limit (100) in function 'main'` (the -Wframe-larger-than limit will be mentioned) Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D104667
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index e745f56..2f65a45 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -285,7 +285,7 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) {
(void)Failed;
}
if (StackSize > Threshold) {
- DiagnosticInfoStackSize DiagStackSize(F, StackSize);
+ DiagnosticInfoStackSize DiagStackSize(F, StackSize, DS_Warning, Threshold);
F.getContext().diagnose(DiagStackSize);
}
ORE->emit([&]() {