The iteration order over a std::set<Module*> depends on the addresses of the

modules. Avoid that to make the order the linker sees the modules deterministic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2012-01-23 03:41:53 +00:00
parent 2b21fbaf11
commit 603d6b56a2
3 changed files with 17 additions and 15 deletions

View File

@ -394,7 +394,7 @@ class Archive {
/// @brief Look up multiple symbols in the archive.
bool findModulesDefiningSymbols(
std::set<std::string>& symbols, ///< Symbols to be sought
std::set<Module*>& modules, ///< The modules matching \p symbols
SmallVectorImpl<Module*>& modules, ///< The modules matching \p symbols
std::string* ErrMessage ///< Error msg storage, if non-zero
);