Files
swift-mirror/include/swift/IDETool/CompilerInvocation.h
Allan Shortlidge d663c11df7 IDE: Move compiler invocation utils to break cycle with Frontend.
Move compiler invocation utilities up into the IDETool library which is designed to be dependent on the Frontend and FrontendTool libraries.
2022-10-29 17:51:53 -07:00

42 lines
1.4 KiB
C++

//===--- CompilerInvocation.h ---------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_IDE_COMPILERINVOCATION_H
#define SWIFT_IDE_COMPILERINVOCATION_H
#include "swift/Frontend/Frontend.h"
namespace swift {
class CompilerInvocation;
namespace ide {
bool initCompilerInvocation(
CompilerInvocation &Invocation, ArrayRef<const char *> OrigArgs,
FrontendOptions::ActionType Action, DiagnosticEngine &Diags,
StringRef UnresolvedPrimaryFile,
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FileSystem,
const std::string &swiftExecutablePath,
const std::string &runtimeResourcePath,
const std::string &diagnosticDocumentationPath, time_t sessionTimestamp,
std::string &Error);
bool initInvocationByClangArguments(ArrayRef<const char *> ArgList,
CompilerInvocation &Invok,
std::string &Error);
} // namespace ide
} // namespace swift
#endif // SWIFT_IDE_COMPILERINVOCATION_H