[PATCH] D54384: [llvm-objcopy] Add --build-id-link-dir flag

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 12:23:53 PST 2018


dblaikie added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp:155-156
+                             const object::ELFObjectFileBase &In) {
+  Error Err = Error::success();
+  Optional<ArrayRef<uint8_t>> BuildIdBytes = findBuildID(In, Err);
+  if (Err)
----------------
Curious API design - perhaps you wouldn't trip over the Error clearing issues if you used 

  Expected<ArrayRef<uint8_t>> findBuildID(In);

Errors as out parameters are, tricky.


Repository:
  rL LLVM

https://reviews.llvm.org/D54384





More information about the llvm-commits mailing list