[lld] r208266 - Call normalize() in the common driver.
Rui Ueyama
ruiu at google.com
Wed May 7 16:33:49 PDT 2014
Author: ruiu
Date: Wed May 7 18:33:48 2014
New Revision: 208266
URL: http://llvm.org/viewvc/llvm-project?rev=208266&view=rev
Log:
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.
Modified:
lld/trunk/lib/Driver/Driver.cpp
lld/trunk/lib/Driver/GnuLdDriver.cpp
Modified: lld/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/Driver.cpp?rev=208266&r1=208265&r2=208266&view=diff
==============================================================================
--- lld/trunk/lib/Driver/Driver.cpp (original)
+++ lld/trunk/lib/Driver/Driver.cpp Wed May 7 18:33:48 2014
@@ -47,6 +47,7 @@ bool Driver::link(LinkingContext &contex
InputGraph &inputGraph = context.getInputGraph();
if (!inputGraph.size())
return false;
+ inputGraph.normalize();
bool fail = false;
Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=208266&r1=208265&r2=208266&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdDriver.cpp Wed May 7 18:33:48 2014
@@ -567,13 +567,8 @@ bool GnuLdDriver::parse(int argc, const
if (!ctx->validate(diagnostics))
return false;
- // Normalize the InputGraph.
- inputGraph->normalize();
-
ctx->setInputGraph(std::move(inputGraph));
-
context.swap(ctx);
-
return true;
}
More information about the llvm-commits
mailing list