[llvm] r325762 - [dsymutil] Replace PATH_MAX in SmallString with fixed value.
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 01:42:10 PST 2018
Author: jdevlieghere
Date: Thu Feb 22 01:42:10 2018
New Revision: 325762
URL: http://llvm.org/viewvc/llvm-project?rev=325762&view=rev
Log:
[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
Modified:
llvm/trunk/tools/dsymutil/DwarfLinker.cpp
Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=325762&r1=325761&r2=325762&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Thu Feb 22 01:42:10 2018
@@ -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);
}
More information about the llvm-commits
mailing list