Skip to content
Snippets Groups Projects
Commit ae1d7096 authored by Axel Naumann's avatar Axel Naumann
Browse files

[cling] Prevent the overlay entry from docking to .../include/c++/backward/:

This code must be replaced by a HeaderSearch of vector, stdio.h and then
use their DirectoryEntry-s as path for buildModuleMapOverlayEntry().
parent b4999fef
No related branches found
No related tags found
No related merge requests found
...@@ -279,11 +279,14 @@ namespace cling { ...@@ -279,11 +279,14 @@ namespace cling {
// "/include/c++/" (as stl path is always inferred from gcc path), // "/include/c++/" (as stl path is always inferred from gcc path),
// append this to MOverlay. // append this to MOverlay.
// FIXME: Implement a more sophisticated way to detect stl paths // FIXME: Implement a more sophisticated way to detect stl paths
for (auto SystemPath : HSearchPaths) { for (auto &&SystemPath : HSearchPaths) {
if (llvm::sys::fs::is_directory(SystemPath) && llvm::StringRef SystemPathSR = SystemPath;
(SystemPath.find("/include/c++/") != std::string::npos)) { if (llvm::sys::fs::is_directory(SystemPathSR) &&
llvm::sys::path::filename(SystemPathSR) != "backward" &&
SystemPathSR.contains("/include/c++/")) {
MOverlay += buildModuleMapOverlayEntry(SystemPath, "stl.modulemap", MOverlay += buildModuleMapOverlayEntry(SystemPath, "stl.modulemap",
m_Opts.OverlayFile, /*NotLast*/ true); m_Opts.OverlayFile, /*NotLast*/ true);
break; // first one wins!
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment