[Lldb-commits] [PATCH] D97449: [Diagnose] Unify MCContext and LLVMContext diagnosing

Fangrui Song via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 1 12:50:37 PST 2021


MaskRay added a comment.

Is the https://github.com/ClangBuiltLinux/linux/issues/1269 unreachable error fixed?

Reproduce:

  git clone https://android.googlesource.com/kernel/common.git --branch android-4.19-stable
  cd common
  PATH=path/to/your/clang/bin:$PATH make -s -j 30 LLVM=1 O=/tmp/out/android gki_defconfig bzImage 
  # very slow



================
Comment at: llvm/lib/MC/MCContext.cpp:869
+    SMLoc Loc,
+    std::function<void(SMDiagnostic &, const SourceMgr *)> GetMessage) {
+  SourceMgr SM;
----------------
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`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97449/new/

https://reviews.llvm.org/D97449



More information about the lldb-commits mailing list