[PATCH] D44562: [ELF] Rework debug line parsing to use llvm::Error and callbacks (LLD-side)

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 19 03:35:50 PDT 2018


grimar added inline comments.


================
Comment at: ELF/InputFiles.cpp:136
+                      [&](DebugLineError &Err) { warn(Err.message()); },
+                      [&](ErrorInfoBase &Err) { error(Err.message()); });
+  }
----------------
grimar wrote:
> jhenderson wrote:
> > grimar wrote:
> > > Is it useful to `warn` here? I think we only call this method on linkage error,
> > > so anyways going to terminate the link.
> > > With that, it seems easier to always error out here to simplify code/logic.
> > I'm currently preserving behaviour (or fixing intended behaviour, at least), though I certainly see where you're coming from. In general we try to emit as many errors/warnings as we can before stopping, so I still think it's useful - it might help the user identify some other problem, for example.
> > 
> > I'm not bothered either way though, so if the consensus is to not emit the warning, I can easily change that.
> I meant we always can `error` here instead of `warn` for all cases I think.
As at this point, we are already in error state.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44562





More information about the llvm-commits mailing list