Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM with or without my suggestion.
| lld/ELF/Relocations.cpp | ||
|---|---|---|
| 82 | return ""; might look cleaner here, because a string is returned. Also, I'd get probably rid of msg variable, because it is not used for all paths now: static std::string getDefinedLocation(const Symbol &sym) {
if (sym.file)
return "\n>>> defined in " + toString(sym.file);
if (Optional<std::string> loc = getLinkerScriptLocation(sym))
return "\n>>> defined in " + *loc;
return "";
} | |
return ""; might look cleaner here, because a string is returned.
Also, I'd get probably rid of msg variable, because it is not used for all paths now:
static std::string getDefinedLocation(const Symbol &sym) { if (sym.file) return "\n>>> defined in " + toString(sym.file); if (Optional<std::string> loc = getLinkerScriptLocation(sym)) return "\n>>> defined in " + *loc; return ""; }