[dsymutil] Replace PATH_MAX in SmallString with fixed value.

Apparently the Windows bots don't know this define, so just going with a
sensible default.

Failing builds:
  http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015/builds/19179
  http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/19263

llvm-svn: 325762
This commit is contained in:
Jonas Devlieghere 2018-02-22 09:42:10 +00:00
parent 01e0f25a9f
commit d47268ecc2
1 changed files with 3 additions and 3 deletions

View File

@ -110,18 +110,18 @@ public:
/// StringRef is interned in the given \p StringPool.
StringRef resolve(std::string Path, NonRelocatableStringpool &StringPool) {
StringRef FileName = sys::path::filename(Path);
SmallString<PATH_MAX> ParentPath = sys::path::parent_path(Path);
SmallString<256> ParentPath = sys::path::parent_path(Path);
// If the ParentPath has not yet been resolved, resolve and cache it for
// future look-ups.
if (!ResolvedPaths.count(ParentPath)) {
SmallString<PATH_MAX> RealPath;
SmallString<256> RealPath;
sys::fs::real_path(ParentPath, RealPath);
ResolvedPaths.insert({ParentPath, StringRef(RealPath).str()});
}
// Join the file name again with the resolved path.
SmallString<PATH_MAX> ResolvedPath(ResolvedPaths[ParentPath]);
SmallString<256> ResolvedPath(ResolvedPaths[ParentPath]);
sys::path::append(ResolvedPath, FileName);
return StringPool.internString(ResolvedPath);
}