[PATCH] D28581: Change DWARFDie::getAttributeValue() to DWARFDie::find(), add DWARFDie::findRecurse() and dwarf::toString() helper functions.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 09:30:03 PST 2017


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

Couple of cosmetic comments, but otherwise this is looking good now.
thanks!



================
Comment at: include/llvm/DebugInfo/DWARF/DWARFFormValue.h:203
+      return V->getAsUnsignedConstant();
+    return None;
+  }
----------------
Could this be replaced by getValueOr or does the type system prohibit that?


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFFormValue.h:226
+    return None;
+  }
+  
----------------
ditto


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFFormValue.h:247
+      return V->getAsSignedConstant();
+    return None;
+  }
----------------
ditto


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFFormValue.h:269
+      return V->getAsAddress();
+    return None;
+  }
----------------
getValueOr?


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFFormValue.h:291
+      return V->getAsSectionOffset();
+    return None;
+  }
----------------
getValueOr?


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFFormValue.h:314
+      return V->getAsBlock();
+    return None;
+  }
----------------
getValueOr?


https://reviews.llvm.org/D28581





More information about the llvm-commits mailing list