]> granicus.if.org Git - clang/commitdiff
ToolInvocation::mapVirtualFile(): Tweak for Win32. Handle the key as native path.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 2 Jun 2012 15:34:21 +0000 (15:34 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 2 Jun 2012 15:34:21 +0000 (15:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157889 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/Tooling.cpp

index 50612cb98249013ab1b4317bfcd1bfa3f98df9c9..0c9fa43606544227caa04aecee2ade8fc65f92da 100644 (file)
@@ -166,7 +166,9 @@ ToolInvocation::ToolInvocation(
 }
 
 void ToolInvocation::mapVirtualFile(StringRef FilePath, StringRef Content) {
-  MappedFileContents[FilePath] = Content;
+  SmallString<1024> PathStorage;
+  llvm::sys::path::native(FilePath, PathStorage);
+  MappedFileContents[PathStorage] = Content;
 }
 
 bool ToolInvocation::run() {