Remove an unnecessary const_cast.

I think that this is dating back to when emit used to take a const reference.

llvm-svn: 311948
This commit is contained in:
Adam Nemet 2017-08-28 23:00:13 +00:00
parent fb87fd513f
commit e89676a607

View File

@ -165,7 +165,8 @@ void OptimizationRemarkEmitter::emit(
yaml::Output *Out = F->getContext().getDiagnosticsOutputFile();
if (Out) {
auto *P = const_cast<DiagnosticInfoOptimizationBase *>(&OptDiagBase);
// For remarks the << operator takes a reference to a pointer.
auto *P = &OptDiagBase;
*Out << P;
}
// FIXME: now that IsVerbose is part of DI, filtering for this will be moved