[PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing
Yuanfang Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 1 13:08:20 PST 2021
ychen added inline comments.
================
Comment at: llvm/lib/MC/MCContext.cpp:869
+ SMLoc Loc,
+ std::function<void(SMDiagnostic &, const SourceMgr *)> GetMessage) {
+ SourceMgr SM;
----------------
MaskRay wrote:
> ychen wrote:
> > MaskRay wrote:
> > > Use lightweight function_ref since you don't need to store the callback.
> > I was hesitant to do this because it requires including `STLExtras.h` in MCContext.h which could be bad for compile-time.
> You can forward declare `function_ref` (see `mlir/include/mlir/Support/LLVM.h`).
Thanks. Done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97449/new/
https://reviews.llvm.org/D97449
More information about the cfe-commits
mailing list