klimek added inline comments.
Comment at: lib/Basic/FileManager.cpp:167-168
DirNameStr = DirName.str() + '.';
+llvm::sys::path::native(DirNameStr);
+DirName = DirNameStr;
+ } else {
I'd add a canonicalizePath function that:
-> on unix just returns
erikjv updated this revision to Diff 87376.
erikjv added a comment.
Fixed all failing tests on Windows.
https://reviews.llvm.org/D27810
Files:
lib/Basic/FileManager.cpp
lib/Basic/VirtualFileSystem.cpp
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/CodeGen/debug-prefix-map.c
erikjv added inline comments.
Comment at: lib/Basic/FileManager.cpp:218
+#ifdef LLVM_ON_WIN32
+ SmallString<128> NormalizedPath(Filename.str());
+ llvm::sys::path::native(NormalizedPath);
yaron.keren wrote:
> I'd use a larger SmallString<256>, with large
erikjv added a comment.
besc: I can't reproduce any crash. I tried trunk and the release_39 branch with
msvc2015.
https://reviews.llvm.org/D27810
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
yaron.keren added inline comments.
Comment at: lib/Basic/FileManager.cpp:218
+#ifdef LLVM_ON_WIN32
+ SmallString<128> NormalizedPath(Filename.str());
+ llvm::sys::path::native(NormalizedPath);
I'd use a larger SmallString<256>, with large projects 128 bytes
besc added a comment.
I found a crash when applying this patch to 3.9.1 final (source archives from
http://llvm.org/releases/download.html#3.9.1) and compiling LLVM/Clang with
MinGW-w64 GCC 6.2.0 or MSVC 2015. Clang-format sometimes crashes with input
from stdin, output to stdout and a command
erikjv created this revision.
erikjv added reviewers: bkramer, klimek.
erikjv added a subscriber: cfe-commits.
The problem on windows is that both forward-slashes and back-slashes are
accepted as path separators. However, the FileManager stores the path as
reported by the OS after opening the