Call normalize() in the common driver.
Previously only GNU driver calls InputGraph::normalize, but its functionality is not and should not be limited to GNU ld. Other driver should be able to use it. Currently only linker scripts use the feature, so this change won't change the existing behavior. llvm-svn: 208266
This commit is contained in:
parent
8cb27bb911
commit
b13cda8f3e
|
@ -47,6 +47,7 @@ bool Driver::link(LinkingContext &context, raw_ostream &diagnostics) {
|
|||
InputGraph &inputGraph = context.getInputGraph();
|
||||
if (!inputGraph.size())
|
||||
return false;
|
||||
inputGraph.normalize();
|
||||
|
||||
bool fail = false;
|
||||
|
||||
|
|
|
@ -567,13 +567,8 @@ bool GnuLdDriver::parse(int argc, const char *argv[],
|
|||
if (!ctx->validate(diagnostics))
|
||||
return false;
|
||||
|
||||
// Normalize the InputGraph.
|
||||
inputGraph->normalize();
|
||||
|
||||
ctx->setInputGraph(std::move(inputGraph));
|
||||
|
||||
context.swap(ctx);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue