Dimitry Andric 9738bc28ab Apply llvm fix for assertion failure compiling recent libc++
Merge commit c7c84b90879f from llvm git (by Adrian Prantl):

  [DwarfDebug] Refuse to emit DW_OP_LLVM_arg values wider than 64 bits

  DwarfExpression::addUnsignedConstant(const APInt &Value) only supports
  wider-than-64-bit values when it is used to emit a top-level DWARF
  expression representing the location of a variable. Before this change,
  it was possible to call addUnsignedConstant on >64 bit values within a
  subexpression when substituting DW_OP_LLVM_arg values.

  This can trigger an assertion failure (e.g. PR52584, PR52333) when it
  happens in a fragment (DW_OP_LLVM_fragment) expression, as
  addUnsignedConstant on >64 bit values splits the constant into separate
  DW_OP_pieces, which modifies DwarfExpression::OffsetInBits.

  This change papers over the assertion errors by bailing on overly wide
  DW_OP_LLVM_arg values. A more comprehensive fix might be to be to split
  wide values into pointer-sized fragments.

  [0] https://github.com/llvm/llvm-project/blob/e71fa03/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp#L799-L805

  Patch by Ricky Zhou!

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

MFC after:	3 days
2022-01-29 22:28:24 +01:00
..
2021-12-18 10:09:14 -08:00
2022-01-28 09:56:21 +01:00
2022-01-18 08:10:33 -08:00
2021-12-06 16:36:44 -05:00
2021-03-01 16:01:44 +01:00
2022-01-03 22:03:39 -08:00
2021-07-17 22:20:44 -07:00
2021-01-13 23:56:18 -06:00
2021-11-15 16:58:58 +01:00
2021-12-06 16:36:44 -05:00
2021-11-06 16:24:36 -06:00
2021-02-23 17:47:07 +00:00
2021-01-12 00:56:35 +02:00
2021-11-05 09:39:56 +01:00
2021-05-20 00:12:27 +03:00
2021-01-02 21:03:28 +02:00
2022-01-23 21:58:36 -08:00
2022-01-18 08:17:08 -08:00