summaryrefslogtreecommitdiff
path: root/include/clang/Basic/DiagnosticFrontendKinds.td
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2014-04-16 16:54:24 +0000
committerDiego Novillo <dnovillo@google.com>2014-04-16 16:54:24 +0000
commitd31ddfcf61863ed0c147cc0c027189ff1eb65c57 (patch)
tree9313ad8a987a98dd225ca938ea26bce76eb0622b /include/clang/Basic/DiagnosticFrontendKinds.td
parent98461062a9b329e6d46e5016fd13e4e65edf8c84 (diff)
downloadclang-d31ddfcf61863ed0c147cc0c027189ff1eb65c57.tar.gz
clang-d31ddfcf61863ed0c147cc0c027189ff1eb65c57.tar.bz2
clang-d31ddfcf61863ed0c147cc0c027189ff1eb65c57.tar.xz
Add support for optimization reports.
Summary: This patch adds a new flag -Rpass=. The flag indicates the name of the optimization pass that should emit remarks stating when it made a transformation to the code. This implements the design I proposed in: https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing Other changes: - Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to print "-R" instead of "-W" in the diagnostic message. - In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation object out of the file name, line and column number. Use that location in the call to Diags.Report(). - When -Rpass is used without debug info a note is emitted alerting the user that they need to use -gline-tables-only -gcolumn-info to get this information. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3226 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticFrontendKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticFrontendKinds.td6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td
index 32c824a930..7b500eed5c 100644
--- a/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -32,6 +32,12 @@ def err_fe_backend_plugin: Error<"%0">, CatBackend;
def remark_fe_backend_plugin: Remark<"%0">, CatBackend, InGroup<RemarkBackendPlugin>;
def note_fe_backend_plugin: Note<"%0">, CatBackend;
+def remark_fe_backend_optimization_remark : Remark<"%0">, CatBackend,
+ InGroup<BackendOptimizationRemark>, DefaultRemark;
+def note_fe_backend_optimization_remark_missing_loc : Note<"use "
+ "-gline-tables-only -gcolumn-info to track source location information "
+ "for this optimization remark">;
+
def err_fe_invalid_code_complete_file : Error<
"cannot locate code-completion file %0">, DefaultFatal;
def err_fe_stdout_binary : Error<"unable to change standard output to binary">,