freebsd-skq/contrib/llvm
dim 1cd5362c8e 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
..
include Pull in r294458 from upstream llvm trunk (by Sanne Wouda): 2017-04-26 19:33:56 +00:00
lib Pull in r294458 from upstream llvm trunk (by Sanne Wouda): 2017-04-26 19:33:56 +00:00
patches
projects/libunwind libunwind: add noexec stack annotation 2017-01-07 14:40:58 +00:00
tools lld: hack version and help output for compatibility with libtool 2017-03-27 16:01:16 +00:00
utils/TableGen Update llvm to trunk r290819 and resolve conflicts. 2017-01-02 21:25:48 +00:00
FREEBSD-Xlist
LICENSE.TXT Merge llvm, clang, lld and lldb release_40 branch r292009. Also update 2017-01-14 22:12:13 +00:00