[PATCH] D44560: [DWARF] Rework debug line parsing to use llvm::Error and callbacks

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 10 03:27:40 PDT 2018


jhenderson added inline comments.


================
Comment at: unittests/DebugInfo/DWARF/DwarfGenerator.cpp:472-474
+  for (auto &LT : LineTables) {
+    LT->generate(*MC, *Asm);
+  }
----------------
dblaikie wrote:
> Usually LLVM code omits braces from single line blocks.
Of course. My bad.


================
Comment at: unittests/DebugInfo/DWARF/DwarfGenerator.cpp:501-502
+dwarfgen::LineTable &dwarfgen::Generator::addLineTable(DwarfFormat Format) {
+  LineTables.push_back(std::unique_ptr<LineTable>(
+      new LineTable(*this, Version, Format, Asm->getPointerSize())));
+  return *LineTables.back();
----------------
dblaikie wrote:
> make_unique?
Ah, I didn't realise there was an llvm::make_unique. Thanks for pointing it out! I'll tweak the function above it too to match.


Repository:
  rL LLVM

https://reviews.llvm.org/D44560





More information about the llvm-commits mailing list