[PATCH] D49542: DwarfDebug: Reduce duplication in addAccel*** methods

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 19 06:54:45 PDT 2018


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

LGTM. This is definitely much better!



================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2418
+      Holder.getStringPool().getEntry(*Asm, Name);
+  if (Kind == AccelTableKind::Apple)
+    AppleAccel.addName(Ref, Die);
----------------
I think I slightly prefer a switch here with an unreachable, so we have a NO-OP in case the default hasn't been resolved yet (instead or arbitrarily defaulting to DWARF). 


Repository:
  rL LLVM

https://reviews.llvm.org/D49542





More information about the llvm-commits mailing list