[PATCH] D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 29 09:47:24 PST 2019


ruiu added inline comments.


================
Comment at: ELF/ScriptParser.cpp:393
+static BfdDesc parseBfdName(StringRef S) {
+  uint8_t OSABI = S.consume_back("-freebsd") ? ELFOSABI_FREEBSD : ELFOSABI_NONE;
+  return StringSwitch<BfdDesc>(S)
----------------
Can you move this to readOutputFormat? Then you don't need to change this function at all.

Also you shouldn't change OSABI if it does not end with `-freebsd`, as we shouldn't add the assumption if not FreeBSD, it is always ELFOSABI_NONE.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D57283





More information about the llvm-commits mailing list