[PATCH] D136954: DiagnosticInfo: Report function location for resource limits
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 13:22:15 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/include/llvm/IR/DiagnosticInfo.h:356
+/// Diagnostic information for stack size etc. reporting.
+/// This is basically a function and a size.
----------------
aeubanks wrote:
> any reason for moving this code? it makes it hard to see the diff
Moving after DiagnosticInfoWithLocationBase since it's now the base class
================
Comment at: llvm/lib/IR/DiagnosticInfo.cpp:76
void DiagnosticInfoResourceLimit::print(DiagnosticPrinter &DP) const {
- DP << getResourceName() << " (" << getResourceSize() << ") exceeds limit ("
- << getResourceLimit() << ") in function '" << getFunction() << '\'';
+ DP << getLocationStr() << ": " << getResourceName() << " ("
+ << getResourceSize() << ") exceeds limit (" << getResourceLimit()
----------------
aeubanks wrote:
> we should guard this with `isLocationAvailable()`, the `<unknown>:0:0` isn't very useful
Everywhere else here prints the unknown. I'd rather keep it consistent and remove them all together later
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136954/new/
https://reviews.llvm.org/D136954
More information about the llvm-commits
mailing list