summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/backend-stack-frame-diagnostics.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Prevent link warnings due to -Wframe-larger-than=Alp Toker2014-07-101-0/+4
| | | | | | | | | | | | | | | | | | | Although this is nominally a -W option, we actually handle it in the driver exactly as an f-group flag that's translated directly to -mllvm. That means f_Group (and unintuitively, not W_Group) has the semantics we want to make it behave like a standard warning flag: no automatic forwarding, no warning for link invocations and compile-only. Silences diagnostics like: [691/1545] Linking CXX executable bin/llvm-diff clang-3.5: warning: argument unused during compilation: '-Wframe-larger-than=2048' (Hopefully we can move towards handling these in the frontend but that'll require some infrastructure work.) llvm-svn: 212670
* Don't suppress backend diagnostics in system headersAlp Toker2014-06-101-2/+22
| | | | | | | Doing so would be inconsistent with the common fallback case where backend diagnostics without source locations are emitted unconditionally. llvm-svn: 210515
* Make '-Werror=frame-larger-than=' and associated diagnostic pragmas ↵Alp Toker2014-06-091-0/+10
| | | | | | | | | | | GCC-compatible It turns out the trailing '=' really is part of the option name spelling and treating it as such gets us compatible with GCC's -Werror= and pragmas. (GCC doesn't appear to support any -Wno- form for this diagnostic but we do.) llvm-svn: 210503
* Implement -Wframe-larger-than backend diagnosticAlp Toker2014-06-051-0/+51
Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature. This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics. An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation. llvm-svn: 210293
OpenPOWER on IntegriCloud