[PATCH] D40954: [ELF] - Teach LLD to hint about -fdebug-types-section.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 15:28:58 PST 2017
ruiu added inline comments.
================
Comment at: ELF/Arch/AArch64.cpp:340
default:
- error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type));
+ error(getErrorLocation(Loc).Loc + "unrecognized reloc " + Twine(Type));
}
----------------
`getErrorLocation(Loc).Loc` looks odd by itself. `getErrorLocation` should, well, return an error location. If you need to access `Loc` member of its return value, that implies that the function does return something more than a location. Please revert this and other lines.
================
Comment at: ELF/Target.cpp:90
-template <class ELFT> static std::string getErrorLoc(const uint8_t *Loc) {
+template <class ELFT> static ErrLoc getErrorLoc(const uint8_t *Loc) {
for (InputSectionBase *D : InputSections) {
----------------
If you need to get an input section, you can just define a different function, instead of making the return type more complex.
https://reviews.llvm.org/D40954
More information about the llvm-commits
mailing list