I think that this is dating back to when emit used to take a const reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311948
91177308-0d34-0410-b5e6-
96231b3b80d8
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