[PATCH] D70486: Make DebugVariable class available in DebugInfoMetadata

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 04:43:31 PST 2019


StephenTozer marked an inline comment as done.
StephenTozer added inline comments.


================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:3296
+
+  const FragmentInfo getFragmentDefault() const {
+    return Fragment.getValueOr(DefaultFragment);
----------------
aprantl wrote:
> This warrants a comment explaining what this function does.
> 
> Is this actually more readable than `Fragment.getValueOr(DefaultFragment)`?
Does `getFragmentOrDefault()` sound more descriptive? It seems like a useful helper to have, in no small part because just having a static const member isn't as clear to a user as there being an explicit "get-value-or-default" function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70486





More information about the llvm-commits mailing list