diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-01-29 06:25:59 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-01-29 06:25:59 +0000 |
commit | 6cf2df29e7026a6387cde2b752e2486a691dff8a (patch) | |
tree | 3465f2b28a95d8b0c15988d6811bcb628a5f328c /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 9a435729b4b7d94a8c126f4c186da1a202f05b9a (diff) | |
download | bcm5719-llvm-6cf2df29e7026a6387cde2b752e2486a691dff8a.tar.gz bcm5719-llvm-6cf2df29e7026a6387cde2b752e2486a691dff8a.zip |
Make a codegen warning a real warning instead of a getCustomDiagID().
Warnings shouldn't use getCustomDiagID(), since then they can't be disabled
via a flag, can't be remapped, etc.
llvm-svn: 227420
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 23991e7d3ec..499b97d7846 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -709,11 +709,9 @@ void CodeGenAction::ExecuteAction() { } const TargetOptions &TargetOpts = CI.getTargetOpts(); if (TheModule->getTargetTriple() != TargetOpts.Triple) { - unsigned DiagID = CI.getDiagnostics().getCustomDiagID( - DiagnosticsEngine::Warning, - "overriding the module target triple with %0"); - - CI.getDiagnostics().Report(SourceLocation(), DiagID) << TargetOpts.Triple; + CI.getDiagnostics().Report(SourceLocation(), + diag::warn_fe_override_module) + << TargetOpts.Triple; TheModule->setTargetTriple(TargetOpts.Triple); } |