[llvm-commits] [lld] r173381 - in /lld/trunk: include/lld/Core/PassManager.h lib/Driver/LinkerInvocation.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Thu Jan 24 14:52:43 PST 2013
Author: mspencer
Date: Thu Jan 24 16:52:42 2013
New Revision: 173381
URL: http://llvm.org/viewvc/llvm-project?rev=173381&view=rev
Log:
[Driver] Run the pass manager.
Modified:
lld/trunk/include/lld/Core/PassManager.h
lld/trunk/lib/Driver/LinkerInvocation.cpp
Modified: lld/trunk/include/lld/Core/PassManager.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/PassManager.h?rev=173381&r1=173380&r2=173381&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/PassManager.h (original)
+++ lld/trunk/include/lld/Core/PassManager.h Thu Jan 24 16:52:42 2013
@@ -11,6 +11,7 @@
#define LLD_CORE_PASS_MANAGER_H
#include "lld/Core/LLVM.h"
+#include "lld/Core/Pass.h"
#include <memory>
#include <vector>
Modified: lld/trunk/lib/Driver/LinkerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/LinkerInvocation.cpp?rev=173381&r1=173380&r2=173381&view=diff
==============================================================================
--- lld/trunk/lib/Driver/LinkerInvocation.cpp (original)
+++ lld/trunk/lib/Driver/LinkerInvocation.cpp Thu Jan 24 16:52:42 2013
@@ -10,6 +10,7 @@
#include "lld/Driver/LinkerInvocation.h"
#include "lld/Core/InputFiles.h"
+#include "lld/Core/PassManager.h"
#include "lld/Core/Resolver.h"
#include "lld/Driver/Target.h"
#include "lld/ReaderWriter/Reader.h"
@@ -75,7 +76,11 @@
Resolver resolver(target->getTargetInfo(), inputs);
resolver.resolve();
- File &merged = resolver.resultFile();
+ MutableFile &merged = resolver.resultFile();
+
+ PassManager pm;
+ target->getTargetInfo().addPasses(pm);
+ pm.runOnFile(merged);
if (error_code ec = writer) {
llvm::errs() << "Failed to get writer: " << ec.message() << ".\n";
More information about the llvm-commits
mailing list