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:
Rui Ueyama 2014-05-07 23:33:48 +00:00
parent 8cb27bb911
commit b13cda8f3e
2 changed files with 1 additions and 5 deletions

View File

@ -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;

View File

@ -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;
}