Restore a comment that was accidentally changed.

llvm-svn: 287457
This commit is contained in:
Rui Ueyama 2016-11-19 19:26:52 +00:00
parent 061f9286df
commit 1cb63183af
1 changed files with 3 additions and 2 deletions

View File

@ -145,11 +145,12 @@ Optional<std::string> elf::findFromSearchPaths(StringRef Path) {
return None; return None;
} }
// Searches a given library from input search paths, which are filled // This is for -lfoo. We'll look for libfoo.so or libfoo.a from
// from -L command line switches. Returns a path to an existent library file. // search paths.
Optional<std::string> elf::searchLibrary(StringRef Name) { Optional<std::string> elf::searchLibrary(StringRef Name) {
if (Name.startswith(":")) if (Name.startswith(":"))
return findFromSearchPaths(Name.substr(1)); return findFromSearchPaths(Name.substr(1));
for (StringRef Dir : Config->SearchPaths) { for (StringRef Dir : Config->SearchPaths) {
if (!Config->Static) if (!Config->Static)
if (Optional<std::string> S = findFile(Dir, "lib" + Name + ".so")) if (Optional<std::string> S = findFile(Dir, "lib" + Name + ".so"))