[PATCH] D91722: [DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 17:13:46 PST 2020


aprantl added a comment.

This is nice!



================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1790
+  case Instruction::Add:
+    Opcodes.push_back(dwarf::DW_OP_plus);
+    break;
----------------
Nit: Instead of having 20 calls to push_back, would it make sense to have a helper function that just does `switch(opcode) { case Instruction::Add: return dwarf::DW_OP_plus; ...}`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91722/new/

https://reviews.llvm.org/D91722



More information about the llvm-commits mailing list