[PATCH] D67263: [DwarfExpression] Disallow some rewrites to avoid undefined behavior
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 05:14:33 PDT 2019
bjope marked an inline comment as done.
bjope added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:650
SmallVector<uint64_t, 8> Ops;
- Ops.push_back(dwarf::DW_OP_plus_uconst);
- Ops.push_back(Offset);
+ DIExpression::appendOffset(Ops, Offset);
// According to
----------------
This fix was (the minimum) needed to make other lit tests pass. I.e not ending up with huge unsigned offsets in DW_OP_plus_uconst or DW_OP_plus resulting in changes in DWARF output.
So the "regressions" seen in the added dw_op_constu.mir test case are not supposed to happen in reality (as long as we use DW_OP_minus when having negative offsets).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67263/new/
https://reviews.llvm.org/D67263
More information about the llvm-commits
mailing list