[PATCH] D31688: [COFF] support /ERRORLIMIT option

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 17:32:10 PDT 2017


ruiu added inline comments.


================
Comment at: COFF/Driver.cpp:124
     return Symtab.addFile(make<BitcodeFile>(MBRef));
   if (Magic == file_magic::coff_cl_gl_object)
+    error(MBRef.getBufferIdentifier() + ": is not a native COFF file. "
----------------
Add a blank line so that this `if ~ else` is visually separated from the above `if`s.


================
Comment at: COFF/Driver.cpp:654
   if (Args.hasArg(OPT_noentry)) {
     if (!Args.hasArg(OPT_dll))
+      error("/noentry must be specified with /dll");
----------------
Flip the condition to remove `!`.


================
Comment at: COFF/Error.cpp:75
   if (Config->ErrorLimit == 0 || ErrorCount < Config->ErrorLimit) {
+    errs() << "error " << ErrorCount << " of " << Config->ErrorLimit << "\n";
     print("error: ", raw_ostream::RED);
----------------
Remove?


https://reviews.llvm.org/D31688





More information about the llvm-commits mailing list