ErrorOr<StringRef> MachOLinkingContext::searchLibrary(StringRef libName) const { SmallString<256> path; for (StringRef dir : searchDirs()) { ErrorOr<StringRef> ec = searchDirForLibrary(dir, libName); if (ec) return ec; } return make_error_code(llvm::errc::no_such_file_or_directory); }
void searchDirs(int procChildren[], int dirNames[], int count,cpuVals *cpv,int tempPid) { int x=0,ppid=0; struct cpuVals tempCpu; for(x = 0; x < count; x++) { ppid = getProcessInfo(dirNames[x],NULL,&tempCpu,procChildren[x]); if(ppid==tempPid) { cpv->userTime += tempCpu.userTime; cpv->sysTime += tempCpu.sysTime; searchDirs(procChildren,dirNames,count,cpv,dirNames[x]); } else { tempCpu.userTime=0; tempCpu.sysTime=0; } } }