[PATCH] D54465: [CodeGen] Fix bugs in LiveDebugVariables when debug labels are generated.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 16:48:43 PST 2018


aprantl added inline comments.


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:338
 
+/// UserLabel - A user label is a part of a debug info user label.
+class UserLabel {
----------------
Please don't repeat the function name in the Doxygen comment. I know the other code in this file does this, but that should be fixed, too :-)


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:415
+  /// handleDebugLabel - Add DBG_LABEL instruction to UserLabel.
+  /// @param MI  DBG_LABEL instruction
+  /// @param Idx Last valid SlotIndex before instruction.
----------------
Would you mind doing an NFC commit that just fixes up all the doxygen comments in this file?

We generally use `\` instead of `@`.


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:529
+    OS << Res << "," << L->getLine();
+  if (auto *InlinedAt = DL->getInlinedAt()) {
+    if (DebugLoc InlinedAtDL = InlinedAt) {
----------------
Can't this code be shared with the DBG_VALUE printing function?


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:1423
+  LLVM_DEBUG(dbgs() << "********** EMITTING LIVE DEBUG LABELS **********\n");
+  for (unsigned i = 0, e = userLabels.size(); i != e; ++i) {
+    LLVM_DEBUG(userLabels[i]->print(dbgs(), TRI));
----------------
range-based for?


Repository:
  rL LLVM

https://reviews.llvm.org/D54465





More information about the llvm-commits mailing list