Don't use PATH_MAX.
authorSean Silva <chisophugis@gmail.com>
Thu, 7 Apr 2016 01:58:14 +0000 (01:58 +0000)
committerSean Silva <chisophugis@gmail.com>
Thu, 7 Apr 2016 01:58:14 +0000 (01:58 +0000)
This is a SmallVector anyway, and so the exact size doesn't matter.

clang\lib\Frontend\ModuleDependencyCollector.cpp(83) : error C2065: 'PATH_MAX' : undeclared identifier
clang\lib\Frontend\ModuleDependencyCollector.cpp(83) : error C2975: 'InternalLen' : invalid template argument for 'llvm::SmallString', expected compile-time constant expression
        llvm\include\llvm/ADT/SmallString.h(24) : see declaration of 'InternalLen'

llvm-svn: 265634

clang/lib/Frontend/ModuleDependencyCollector.cpp

index d23f988..3e6c0d2 100644 (file)
@@ -81,7 +81,7 @@ void ModuleDependencyCollector::attachToPreprocessor(Preprocessor &PP) {
 }
 
 static bool isCaseSensitivePath(StringRef Path) {
-  SmallString<PATH_MAX> TmpDest = Path, UpperDest, RealDest;
+  SmallString<256> TmpDest = Path, UpperDest, RealDest;
   // Remove component traversals, links, etc.
   if (!real_path(Path, TmpDest))
     return true; // Current default value in vfs.yaml