[PATCH] D64631: [obj2yaml] - Rework tool's error reporting logic for ELF target.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 01:30:45 PDT 2019


grimar added inline comments.


================
Comment at: tools/obj2yaml/elf2yaml.cpp:164
+      if (Error E = dumpSymbols(&Sec, Y->Symbols))
+        return std::move(E);
     if (Sec.sh_type == ELF::SHT_DYNSYM)
----------------
MaskRay wrote:
> `return E;` to avoid clang -Wpessimizing-move (automatic move from lvalues applies here)
I can't. Otherwise I have the following errors:
(MVSC 2017)

```
elf2yaml.cpp(164): error C2280: 'llvm::Error::Error(const llvm::Error &)': attempting to reference a deleted function
llvm/Support/Error.h(186): note: see declaration of 'llvm::Error::Error'
llvm/Support/Error.h(186): note: 'llvm::Error::Error(const llvm::Error &)': function was explicitly deleted
```

When I search for "return std::move(" in LLVMs code, I see many similar places.


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

https://reviews.llvm.org/D64631





More information about the llvm-commits mailing list