[PATCH] D26857: [ELF] Print output name for command line errors

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 17:10:27 PST 2018


ruiu added inline comments.


================
Comment at: ELF/Driver.cpp:99
     else
-      error("unknown emulation: " + Emul);
+      error(getOutputName() + ": unknown emulation: " + Emul);
   }
----------------
evgeny777 wrote:
> rafael wrote:
> > I am not sure it makes sense to always print the output name. In here the issue has nothing to do with the files, it is just a broken -m option.
> > 
> > If you want a common format, maybe printing something like" <command line>:" in here would be better.
> So do you propose to use **<command line>** as tag for all command line arguments errors?
How about showing the error message in this format for command line error for --foo?

  error: -m: unknown emulation: xyz


Repository:
  rL LLVM

https://reviews.llvm.org/D26857





More information about the llvm-commits mailing list