From 612ed3c0007b15a8f82fb3cf3b5f1052384e726a Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 22 Feb 2018 09:42:10 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325762 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/dsymutil/DwarfLinker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/dsymutil/DwarfLinker.cpp b/tools/dsymutil/DwarfLinker.cpp index 05c933e0746dd..2d89e6b2e90cd 100644 --- a/tools/dsymutil/DwarfLinker.cpp +++ b/tools/dsymutil/DwarfLinker.cpp @@ -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 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 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 ResolvedPath(ResolvedPaths[ParentPath]); + SmallString<256> ResolvedPath(ResolvedPaths[ParentPath]); sys::path::append(ResolvedPath, FileName); return StringPool.internString(ResolvedPath); }