Revert "[Modules] Make header inclusion order from umbrella dirs deterministic"

Reverts commit r289478.

This broke
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2070
(and maybe
http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/2246)

llvm-svn: 289494
This commit is contained in:
Bruno Cardoso Lopes 2016-12-12 23:22:30 +00:00
parent 2a1554a0b6
commit 295f940ca6
1 changed files with 3 additions and 11 deletions

View File

@ -233,7 +233,6 @@ collectModuleHeaderIncludes(const LangOptions &LangOpts, FileManager &FileMgr,
llvm::sys::path::native(UmbrellaDir.Entry->getName(), DirNative);
vfs::FileSystem &FS = *FileMgr.getVirtualFileSystem();
SmallVector<std::pair<std::string, const FileEntry *>, 8> Headers;
for (vfs::recursive_directory_iterator Dir(FS, DirNative, EC), End;
Dir != End && !EC; Dir.increment(EC)) {
// Check whether this entry has an extension typically associated with
@ -264,20 +263,13 @@ collectModuleHeaderIncludes(const LangOptions &LangOpts, FileManager &FileMgr,
++It)
llvm::sys::path::append(RelativeHeader, *It);
Headers.push_back(std::make_pair(RelativeHeader.str(), Header));
// Include this header as part of the umbrella directory.
Module->addTopHeader(Header);
addHeaderInclude(RelativeHeader, Includes, LangOpts, Module->IsExternC);
}
if (EC)
return EC;
// Sort header paths and make the header inclusion order deterministic
// across different OSs and filesystems.
llvm::array_pod_sort(Headers.begin(), Headers.end());
for (auto &H : Headers) {
// Include this header as part of the umbrella directory.
Module->addTopHeader(H.second);
addHeaderInclude(H.first, Includes, LangOpts, Module->IsExternC);
}
}
// Recurse into submodules.