[PATCH] D62904: [DebugInfo] Honour variable fragments in LiveDebugValues

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 14:28:48 PDT 2019


aprantl added a comment.

I think this is starting to look good!



================
Comment at: lib/CodeGen/LiveDebugValues.cpp:148
+
+    const FragmentInfo getFragmentDefault() const {
+      return (Fragment) ? *Fragment : DefaultFragment;
----------------
llvm::Optional has getValueOr() could we use that instead of this function?


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:913
+      OverlappingFragments.insert({{MIVar.getVar(), ThisFragment}, {}});
+  if (!IsInOLapMap.second)
+    return;
----------------
Instead of having all these references to .second (and only .second) in this function, would it make sense to store a reference to .second in the auto variables and give them a different name?

i.e., `auto CurrentFragments = IsInOLapMap.first.second;`


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

https://reviews.llvm.org/D62904





More information about the llvm-commits mailing list