diff options
author | Fangrui Song <i@maskray.me> | 2021-06-22 09:55:20 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-06-22 09:55:20 -0700 |
commit | f53d791520d85c5404381ff3ad92cb918256029d (patch) | |
tree | 385bfc379a8c72a48012e552fc3b06cee0099613 /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 40d6d2c49dd16641a6fd40916e1cc9a58513ed15 (diff) | |
download | llvm-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.cpp | 2 |
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([&]() { |