================ @@ -0,0 +1,112 @@ +//===- ModulesDriver.h - Driver managed module builds --------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// This file defines functionality to support driver managed builds for +/// compilations which use Clang modules or standard C++20 named modules. +/// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_DRIVER_MODULESDRIVER_H +#define LLVM_CLANG_DRIVER_MODULESDRIVER_H + +#include "clang/Driver/Types.h" +#include "llvm/Support/Error.h" + +namespace llvm { +namespace vfs { +class FileSystem; +} // namespace vfs +namespace opt { +class Arg; +} // namespace opt +} // namespace llvm + +namespace clang { +class DiagnosticsEngine; +namespace driver { +class Compilation; +} // namespace driver +} // namespace clang + +namespace clang::driver::modules { + +/// A list of inputs and their types for the given arguments. +/// Identical to Driver::InputTy. +using InputTy = std::pair<types::ID, const llvm::opt::Arg *>; + +/// A list of inputs and their types for the given arguments. +/// Identical to Driver::InputList. +using InputList = llvm::SmallVector<InputTy, 16>; + +/// Checks whether the -fmodules-driver feature should be implicitly enabled. ---------------- naveen-seth wrote:
Currently, the logic to implicitly enable the feature is only used for diagnostics but doesn't actually do anything. https://github.com/llvm/llvm-project/blob/cb0ac589ecc742ae6933a634c577eeb46831114d/clang/lib/Driver/Driver.cpp#L1838-L1841 This was already introduced in #153497 and is just being relocated in this patch. Since this patch introduces the `ModulesDriver.cpp` file, I thought it made sense to also move as much modules-driver–related code there as possible. https://github.com/llvm/llvm-project/pull/152770 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
