diff options
| author | Diego Novillo <dnovillo@google.com> | 2014-04-21 23:16:03 +0000 |
|---|---|---|
| committer | Diego Novillo <dnovillo@google.com> | 2014-04-21 23:16:03 +0000 |
| commit | 0da1b7016a9d5e5d25153fa3798351967fce1903 (patch) | |
| tree | 2a3d3ee3685d8c07e97b37c9a27d731d892a1f3e /lib/CodeGen/CodeGenAction.cpp | |
| parent | e2f48e941c2faecd1154ee8dec9458377b99aa4f (diff) | |
| download | clang-0da1b7016a9d5e5d25153fa3798351967fce1903.tar.gz clang-0da1b7016a9d5e5d25153fa3798351967fce1903.tar.bz2 clang-0da1b7016a9d5e5d25153fa3798351967fce1903.tar.xz | |
Allow adding a value to a flag in diagnostics.
Summary:
This allows callers of Diags.Report() to append a value to the name of
the flag associated with the diagnostic. This is useful in cases like
the -Rpass flag, where we want the diagnostic to show the name of the
pass that matched the pattern. Instead of showing "... [-Rpass]", this
allows us to show "... [-Rpass=passname]".
Reviewers: rsmith
CC: cfe-commits
Differential Revision: http://reviews.llvm.org/D3441
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenAction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenAction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index 67859bad2b..5952e671b5 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -404,7 +404,8 @@ void BackendConsumer::OptimizationRemarkHandler( Loc = SourceMgr.translateFileLineCol(FileMgr.getFile(Filename), Line, Column); } - Diags.Report(Loc, diag::remark_fe_backend_optimization_remark) + Diags.Report(Loc, diag::remark_fe_backend_optimization_remark, + D.getPassName()) << D.getMsg().str(); if (Line == 0) |
