[PATCH] D153459: [DebugInfo] Add error handling to DWARFDebugAbbrev::getAbbreviationDeclarationSet

Felipe de Azevedo Piovezan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 05:45:51 PDT 2023


fdeazeve accepted this revision.
fdeazeve added a comment.

LGTM!



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp:162
+  if (Error Err = AbbrDecls.extract(*Data, &Offset))
+    return std::move(Err);
 
----------------
bulbazord wrote:
> dblaikie wrote:
> > no need for std::move here, I think? (implicit move from a local variable when you `return local`)
> Last time I did that, some older compilers on some buildbots didn't like it. I added the `std::move` to be explicit.
The move is required because the return type is `Expected` so, without the move, we are calling the constructor of `Expected` with an `Error &`, and this ctor doesn't exist. We need an  `Error &&` for the right ctor to be found


================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/empty-CU.s:22
+.byte 0    # EOM(1)
+.byte 0    # EOM(2)
+           # Intentionally missing EOM(3)
----------------
Out of curiosity, do you know what EOM stands for? End of <something>? End <something> Marker?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153459



More information about the llvm-commits mailing list