Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
[dsymutil] Replace PATH_MAX in SmallString with fixed value.
Browse files Browse the repository at this point in the history
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325762 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
JDevlieghere committed Feb 22, 2018
1 parent 7f3a2c2 commit 612ed3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/dsymutil/DwarfLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,18 @@ class CachedPathResolver {
/// 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);
}
Expand Down

0 comments on commit 612ed3c

Please sign in to comment.