1. [Sanitizer][NFC] Fix typo (details)
  2. [Diagnose] Unify MCContext and LLVMContext diagnosing (details)
  3. Fix build 5de2d189e6ad4 (details)
Commit 2b5f3f446f36a68dfcee2fa23534044b491a2ad8 by luismarques
[Sanitizer][NFC] Fix typo
The file was modifiedcompiler-rt/lib/asan/asan_posix.cpp (diff)
Commit 5de2d189e6ad466a1f0616195e8c524a4eb3cbc0 by Yuanfang Chen
[Diagnose] Unify MCContext and LLVMContext diagnosing

The situation with inline asm/MC error reporting is kind of messy at the
moment. The errors from MC layout are not reliably propagated and users
have to specify an inlineasm handler separately to get inlineasm
diagnose. The latter issue is not a correctness issue but could be improved.

* Kill LLVMContext inlineasm diagnose handler and migrate it to use
* Introduce `DiagnoseInfoSrcMgr` to diagnose SourceMgr backed errors. This
  covers use cases like inlineasm, MC, and any clients using SourceMgr.
* Move AsmPrinter::SrcMgrDiagInfo and its instance to MCContext. The next step
  is to combine MCContext::SrcMgr and MCContext::InlineSrcMgr because in all
  use cases, only one of them is used.
* If LLVMContext is available, let MCContext uses LLVMContext's diagnose
  handler; if LLVMContext is not available, MCContext uses its own default
  diagnose handler which just prints SMDiagnostic.
* Change a few clients(Clang, llc, lldb) to use the new way of reporting.

Reviewed By: MaskRay

Differential Revision:
The file was modifiedllvm/include/llvm/IR/DiagnosticInfo.h (diff)
The file was modifiedclang/include/clang/Basic/ (diff)
The file was modifiedllvm/include/llvm/IR/LLVMContext.h (diff)
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (diff)
The file was modifiedllvm/lib/IR/LLVMContextImpl.h (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/lds-initializer.ll (diff)
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h (diff)
The file was modifiedllvm/lib/CodeGen/MachineModuleInfo.cpp (diff)
The file was modifiedllvm/lib/IR/LLVMContext.cpp (diff)
The file was modifiedclang/include/clang/Basic/ (diff)
The file was modifiedllvm/tools/llc/llc.cpp (diff)
The file was modifiedllvm/test/CodeGen/XCore/section-name.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll (diff)
The file was modifiedllvm/lib/MC/MCContext.cpp (diff)
The file was modifiedclang/include/clang/Basic/ (diff)
The file was modifiedllvm/lib/IR/DiagnosticInfo.cpp (diff)
The file was modifiedclang/lib/CodeGen/CodeGenAction.cpp (diff)
The file was modifiedlldb/source/Expression/IRExecutionUnit.cpp (diff)
The file was modifiedllvm/include/llvm/MC/MCContext.h (diff)
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp (diff)
Commit 1490f6b72c30f690b18018ceefd499562b255efa by Yuanfang Chen
Fix build 5de2d189e6ad4

Remove source_mgr remark diagnose kind.
The file was modifiedclang/include/clang/Basic/ (diff)