We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 684e79f commit ae5fdaeCopy full SHA for ae5fdae
lld/ELF/Relocations.cpp
@@ -65,21 +65,8 @@ using namespace llvm::support::endian;
65
using namespace lld;
66
using namespace lld::elf;
67
68
-static std::optional<std::string> getLinkerScriptLocation(Ctx &ctx,
69
- const Symbol &sym) {
70
- for (SectionCommand *cmd : ctx.script->sectionCommands)
71
- if (auto *assign = dyn_cast<SymbolAssignment>(cmd))
72
- if (assign->sym == &sym)
73
- return assign->location;
74
- return std::nullopt;
75
-}
76
-
77
static void printDefinedLocation(ELFSyncStream &s, const Symbol &sym) {
78
- s << "\n>>> defined in ";
79
- if (sym.file)
80
- return void(s << sym.file);
81
- if (std::optional<std::string> loc = getLinkerScriptLocation(s.ctx, sym))
82
- return void(s << *loc);
+ s << "\n>>> defined in " << sym.file;
83
}
84
85
// Construct a message in the following format.
0 commit comments