[PATCH] D61343: [llvm-objcopy] Cache gnu_debuglink's target CRC

MichaƂ Janiszewski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 11:34:24 PDT 2019


janisozaur added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/CopyConfig.cpp:502
+    if (!DebugOrErr)
+      return createStringError(errc::no_such_file_or_directory, "'%s': %s",
+                               Config.AddGnuDebugLink.str().c_str(),
----------------
jhenderson wrote:
> Is "no_such_file_or_directory" the only way MemoryBuffer::getFile can file? What about things like "it's a directory" or "access denied"? If it isn't the only way, we shouldn't be using this misleading error code.
This one seemed the most relevant. Originally `exit(1)` was used explicitly.

All the other option parsing code returns invalid argument (I think it's 22), but it also doesn't verify existence and readability of files.


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

https://reviews.llvm.org/D61343





More information about the llvm-commits mailing list