Files
swift-mirror/lib/Driver/Tool.cpp
Jordan Rose 6fce6d331d [Driver] Better separation of concerns in the Tool hierarchy.
No intended functionality change.

Swift SVN r29666
2015-06-25 15:45:41 +00:00

33 lines
1.3 KiB
C++

//===--- Tool.cpp - Compilation Tools -------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#include "swift/Driver/Tool.h"
#include "swift/Driver/Action.h"
#include "swift/Driver/Job.h"
#include "llvm/ADT/STLExtras.h"
using namespace swift;
using namespace swift::driver;
std::unique_ptr<Job>
Tool::constructJob(const JobAction &JA,
std::unique_ptr<JobList> inputs,
std::unique_ptr<CommandOutput> output,
const ActionList &inputActions,
const llvm::opt::ArgList &args,
const OutputInfo &OI) const {
auto arguments = constructArgumentList(JA, inputs.get(), output.get(),
inputActions, args, OI);
return llvm::make_unique<Job>(JA, *this, std::move(inputs), std::move(output),
getPath(args, OI), std::move(arguments));
}