Skip to content

Commit c240aca

Browse files
committed
Revert "Reland "[clang][modules] Print library module manifest path." (#82160)"
This reverts commit 0c89427.
1 parent cedb970 commit c240aca

File tree

4 files changed

+0
-97
lines changed

4 files changed

+0
-97
lines changed

clang/include/clang/Driver/Driver.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -615,16 +615,6 @@ class Driver {
615615
// FIXME: This should be in CompilationInfo.
616616
std::string GetProgramPath(StringRef Name, const ToolChain &TC) const;
617617

618-
/// Lookup the path to the Standard library module manifest.
619-
///
620-
/// \param C - The compilation.
621-
/// \param TC - The tool chain for additional information on
622-
/// directories to search.
623-
//
624-
// FIXME: This should be in CompilationInfo.
625-
std::string GetStdModuleManifestPath(const Compilation &C,
626-
const ToolChain &TC) const;
627-
628618
/// HandleAutocompletions - Handle --autocomplete by searching and printing
629619
/// possible flags, descriptions, and its arguments.
630620
void HandleAutocompletions(StringRef PassedFlags) const;

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5364,9 +5364,6 @@ def print_resource_dir : Flag<["-", "--"], "print-resource-dir">,
53645364
def print_search_dirs : Flag<["-", "--"], "print-search-dirs">,
53655365
HelpText<"Print the paths used for finding libraries and programs">,
53665366
Visibility<[ClangOption, CLOption]>;
5367-
def print_std_module_manifest_path : Flag<["-", "--"], "print-library-module-manifest-path">,
5368-
HelpText<"Print the path for the C++ Standard library module manifest">,
5369-
Visibility<[ClangOption, CLOption]>;
53705367
def print_targets : Flag<["-", "--"], "print-targets">,
53715368
HelpText<"Print the registered targets">,
53725369
Visibility<[ClangOption, CLOption]>;

clang/lib/Driver/Driver.cpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,12 +2196,6 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
21962196
return false;
21972197
}
21982198

2199-
if (C.getArgs().hasArg(options::OPT_print_std_module_manifest_path)) {
2200-
llvm::outs() << GetStdModuleManifestPath(C, C.getDefaultToolChain())
2201-
<< '\n';
2202-
return false;
2203-
}
2204-
22052199
if (C.getArgs().hasArg(options::OPT_print_runtime_dir)) {
22062200
if (std::optional<std::string> RuntimePath = TC.getRuntimePath())
22072201
llvm::outs() << *RuntimePath << '\n';
@@ -6174,44 +6168,6 @@ std::string Driver::GetProgramPath(StringRef Name, const ToolChain &TC) const {
61746168
return std::string(Name);
61756169
}
61766170

6177-
std::string Driver::GetStdModuleManifestPath(const Compilation &C,
6178-
const ToolChain &TC) const {
6179-
std::string error = "<NOT PRESENT>";
6180-
6181-
switch (TC.GetCXXStdlibType(C.getArgs())) {
6182-
case ToolChain::CST_Libcxx: {
6183-
std::string lib = GetFilePath("libc++.so", TC);
6184-
6185-
// Note when there are multiple flavours of libc++ the module json needs to
6186-
// look at the command-line arguments for the proper json.
6187-
// These flavours do not exist at the moment, but there are plans to
6188-
// provide a variant that is built with sanitizer instrumentation enabled.
6189-
6190-
// For example
6191-
// StringRef modules = [&] {
6192-
// const SanitizerArgs &Sanitize = TC.getSanitizerArgs(C.getArgs());
6193-
// if (Sanitize.needsAsanRt())
6194-
// return "modules-asan.json";
6195-
// return "modules.json";
6196-
// }();
6197-
6198-
SmallString<128> path(lib.begin(), lib.end());
6199-
llvm::sys::path::remove_filename(path);
6200-
llvm::sys::path::append(path, "modules.json");
6201-
if (TC.getVFS().exists(path))
6202-
return static_cast<std::string>(path);
6203-
6204-
return error;
6205-
}
6206-
6207-
case ToolChain::CST_Libstdcxx:
6208-
// libstdc++ does not provide Standard library modules yet.
6209-
return error;
6210-
}
6211-
6212-
return error;
6213-
}
6214-
62156171
std::string Driver::GetTemporaryPath(StringRef Prefix, StringRef Suffix) const {
62166172
SmallString<128> Path;
62176173
std::error_code EC = llvm::sys::fs::createTemporaryFile(Prefix, Suffix, Path);

clang/test/Driver/modules-print-library-module-manifest-path.cpp

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)