mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
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
This commit is contained in:
parent
9a435729b4
commit
6cf2df29e7
@ -35,6 +35,10 @@ def err_fe_backend_plugin: Error<"%0">, BackendInfo;
|
||||
def remark_fe_backend_plugin: Remark<"%0">, BackendInfo, InGroup<RemarkBackendPlugin>;
|
||||
def note_fe_backend_plugin: Note<"%0">, BackendInfo;
|
||||
|
||||
def warn_fe_override_module : Warning<
|
||||
"overriding the module target triple with %0">,
|
||||
InGroup<DiagGroup<"override-module">>;
|
||||
|
||||
def remark_fe_backend_optimization_remark : Remark<"%0">, BackendInfo,
|
||||
InGroup<BackendOptimizationRemark>;
|
||||
def remark_fe_backend_optimization_remark_missed : Remark<"%0">, BackendInfo,
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user