opnsense-src/contrib/llvm/lib/MC
Dimitry Andric 3b78f6062f Pull in r294458 from upstream llvm trunk (by Sanne Wouda):
[Assembler] Enable nicer diagnostics for inline assembly.

  Fixed test.

  Summary:
  Enables source location in diagnostic messages from the backend.
  This is after parsing, during finalization.  This requires the
  SourceMgr, the inline assembly string buffer, and DiagInfo to still
  be alive after EmitInlineAsm returns.

  This patch creates a single SourceMgr for inline assembly inside the
  AsmPrinter.  MCContext gets a pointer to this SourceMgr.  Using one
  SourceMgr per call to EmitInlineAsm would make it difficult for
  MCContext to figure out in which SourceMgr the SMLoc is located,
  while a single SourceMgr can figure it out if it has multiple
  buffers.

  The Str argument to EmitInlineAsm is copied into a buffer and owned
  by the inline asm SourceMgr.  This ensures that DiagHandlers won't
  print garbage.  (Clang emits a "note: instantiated into assembly
  here", which refers to this string.)

  The AsmParser gets destroyed before finalization, which means that
  the DiagHandlers the AsmParser installs into the SourceMgr will be
  stale.  Restore the saved DiagHandlers.

  Since now we're using just one SourceMgr for multiple inline asm
  strings, we need to tell the AsmParser which buffer it needs to parse
  currently.  Hand a buffer id -- returned from SourceMgr::
  AddNewSourceBuffer -- to the AsmParser.

  Reviewers: rnk, grosbach, compnerd, rengolin, rovka, anemet

  Reviewed By: rnk

  Subscribers: llvm-commits

  Differential Revision: https://reviews.llvm.org/D29441

This improves error reporting for some inline assembly constructs that
clang does not approve of: instead of crashing with a "fatal backend
error", it will now show a normal error message, and point out the
location of the problematic assembly.

Reported by:	mmel
MFC after:	1 week
2017-04-26 19:33:56 +00:00
..
MCDisassembler Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCParser Pull in r294458 from upstream llvm trunk (by Sanne Wouda): 2017-04-26 19:33:56 +00:00
ConstantPools.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
ELFObjectWriter.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MachObjectWriter.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCAsmBackend.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCAsmInfo.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCAsmInfoCOFF.cpp Update llvm to trunk r256633. 2015-12-30 13:13:10 +00:00
MCAsmInfoDarwin.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCAsmInfoELF.cpp Update llvm to release_39 branch r276489, and resolve conflicts. 2016-08-16 21:02:59 +00:00
MCAsmStreamer.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCAssembler.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCCodeEmitter.cpp
MCCodeView.cpp Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch 2017-02-11 13:58:05 +00:00
MCContext.cpp Pull in r294458 from upstream llvm trunk (by Sanne Wouda): 2017-04-26 19:33:56 +00:00
MCDwarf.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCELFObjectTargetWriter.cpp Update llvm to trunk r256633. 2015-12-30 13:13:10 +00:00
MCELFStreamer.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCExpr.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCFragment.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCInst.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCInstPrinter.cpp Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunk 2015-06-10 19:12:52 +00:00
MCInstrAnalysis.cpp Upgrade our copy of llvm/clang to 3.4 release. This version supports 2014-02-16 19:44:07 +00:00
MCInstrDesc.cpp Update llvm to trunk r256633. 2015-12-30 13:13:10 +00:00
MCLabel.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCLinkerOptimizationHint.cpp Update llvm to release_39 branch r276489, and resolve conflicts. 2016-08-16 21:02:59 +00:00
MCMachObjectTargetWriter.cpp Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunk 2015-06-10 19:12:52 +00:00
MCMachOStreamer.cpp Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch 2017-02-01 21:57:07 +00:00
MCNullStreamer.cpp Update llvm/clang to r241361. 2015-07-05 22:34:42 +00:00
MCObjectFileInfo.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCObjectStreamer.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCObjectWriter.cpp Update llvm to trunk r256633. 2015-12-30 13:13:10 +00:00
MCRegisterInfo.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCSchedule.cpp Update llvm/clang to r242221. 2015-08-12 18:31:11 +00:00
MCSection.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCSectionCOFF.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCSectionELF.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCSectionMachO.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCStreamer.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCSubtargetInfo.cpp Update llvm to trunk r256945. 2016-01-06 20:19:13 +00:00
MCSymbol.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCSymbolELF.cpp Update llvm/clang to r241361. 2015-07-05 22:34:42 +00:00
MCTargetOptions.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCValue.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
MCWin64EH.cpp Update llvm to release_39 branch r276489, and resolve conflicts. 2016-08-16 21:02:59 +00:00
MCWinEH.cpp Update llvm to release_39 branch r276489, and resolve conflicts. 2016-08-16 21:02:59 +00:00
StringTableBuilder.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
SubtargetFeature.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
WinCOFFObjectWriter.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
WinCOFFStreamer.cpp Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00