2013-01-24 04:03:10 +08:00
|
|
|
//===- lib/Core/PassManager.cpp - Manage linker passes --------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Linker
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "lld/Core/PassManager.h"
|
|
|
|
|
2013-04-06 08:56:40 +08:00
|
|
|
#include "lld/Core/Instrumentation.h"
|
2013-01-24 04:03:10 +08:00
|
|
|
#include "lld/Core/Pass.h"
|
|
|
|
|
|
|
|
#include "llvm/Support/ErrorOr.h"
|
|
|
|
|
|
|
|
namespace lld {
|
2013-11-05 08:09:36 +08:00
|
|
|
error_code PassManager::runOnFile(std::unique_ptr<MutableFile> &mf) {
|
2013-11-19 14:18:39 +08:00
|
|
|
for (auto &pass : _passes)
|
2013-01-24 04:03:10 +08:00
|
|
|
pass->perform(mf);
|
2013-11-05 09:37:40 +08:00
|
|
|
return error_code::success();
|
2013-01-24 04:03:10 +08:00
|
|
|
}
|
|
|
|
} // end namespace lld
|