[PATCH] D27900: [ELF] - Keep the source file/line location information separate from the object file location information.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 00:16:27 PST 2016


grimar added inline comments.


================
Comment at: ELF/Target.cpp:64
+
+static void fatalAtLocation(const uint8_t *Loc, const llvm::Twine &E) {
+  errorAtLocation(Loc, E);
----------------
ruiu wrote:
> Please avoid writing a new wrapper function.
> 
> What is this function? I think we don't want to print out "fatal error encountered" at end.
Target.cpp now sometimes fatal(), for example when reloc is unrecognized.
So actually problem is to call some error message + hint(). I can't just call
```
fatal(...).
hint(...)
```
because user will not see hint.

That is why I introduced this function. Though I think no need to worry about it probably.
I believe what we can do at first - is to change fatal() to errors() in a separate patch. That removes
need of such hack. I'll try to prepare a patch, not sure why we fatal() now.


https://reviews.llvm.org/D27900





More information about the llvm-commits mailing list